You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently to check if a selector exists we look at each element. This may be slow for large stylesheets
There are a few ways we could improve the lookup speed but I have not yet decide on the best approach:
Some how sorting the rules array on each insert allowing a binary search to be performed for each lookup
This would require a way to sort any css selector while keeping all media queries at the bottom of the array (this is a must)
Since css selectors in Dstyler must be unique on each scope. We may keep a selector->ast_rule_node hashmap for O(1) lookups
Both options have their tradeoffs
The text was updated successfully, but these errors were encountered:
Currently to check if a selector exists we look at each element. This may be slow for large stylesheets
There are a few ways we could improve the lookup speed but I have not yet decide on the best approach:
Some how sorting the rules array on each insert allowing a binary search to be performed for each lookup
This would require a way to sort any css selector while keeping all media queries at the bottom of the array (this is a must)
Since css selectors in Dstyler must be unique on each scope. We may keep a selector->ast_rule_node hashmap for O(1) lookups
Both options have their tradeoffs
The text was updated successfully, but these errors were encountered: