You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Pete Whelpton (Jira)" <ji...@apache.org> on 2020/08/07 08:56:00 UTC
[jira] [Commented] (NETBEANS-1456) Unsupported calc() function in
CSS stylesheets
[ https://issues.apache.org/jira/browse/NETBEANS-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17173000#comment-17173000 ]
Pete Whelpton commented on NETBEANS-1456:
-----------------------------------------
I got somewhat stuck with this, as I can't figure out how to recursive grammar for the calc(). The CSS specification states that implementers should handle 20 levels of depth (e.g. nested parenthesis), I tried to handle three without using recursion, and performance STINKS.
It's not so noticeable on small .css files, but bootstrap.css (my go-to performance benchmark) crawls.
I noticed that GrammarParser doesn't have any kind of caching, so it will try and re-parse css psuedo-properties it has already parsed... I got a noticeable performance against bootstrap.css by adding a "poor mans cache" of a hashmap to the GrammarParser class.
However, looking at the profiler, it still seems like there are WAY too many hashmap entries, and also GrammerParserTree$Entries and ResolvedProperties objects and that probably needs to be sorted out.
I just don't think the css properties parser in NB was designed for multiple properties sharing the same psuedo properties, and now our css properties grammars are getting quite large/intertwined we see performance problems if we add too much more complexity.
I've pushed where I am at here: [https://github.com/peedeeboy/incubator-netbeans/tree/NETBEANS-1456] in case anybody want to take a look from there, but I'm pretty stumped now on how to take this further...
> Unsupported calc() function in CSS stylesheets
> ----------------------------------------------
>
> Key: NETBEANS-1456
> URL: https://issues.apache.org/jira/browse/NETBEANS-1456
> Project: NetBeans
> Issue Type: Bug
> Components: web - CSS Editor
> Affects Versions: 9.0
> Environment: Windows 10
> Reporter: Artur Stępień
> Priority: Minor
> Labels: css, easy
>
> The following code in CSS Editor shows as a warning:
> {code:java}
> .modal-dialog-centered {
> min-height: calc(100% - (0.5rem * 2));
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists