-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Efficiently store computed style data #17
Comments
Here is how I plan to do this: http://jsfiddle.net/ba80ehnv/1/ The code is not optimized at the moment, we can obviously memoize or precompute default style lookups. One further optimization would be to exclude CSS properties like |
This is added in gunesacar/OpenWPM@568a852 |
We've decided against storing all style information; instead we'll handpick more basic style attributes like text color, background color, text size etc. |
We got a ~10x speed increase by limiting ourselves to This is much better than hand-picking style values as we now store all style info. Closing... |
We plan to use computed style in the clustering stage. But storing multiple snapshots of elements' style can be too much, especially in cases like fade in or similar effects, where the style is updated every few milliseconds.
We can consider storing only non-default style values, something like: https://stackoverflow.com/questions/22907735/get-the-computed-style-and-omit-defaults
The text was updated successfully, but these errors were encountered: