Bug 33254
Summary: | Batch DOM changes | ||
---|---|---|---|
Product: | WebKit | Reporter: | chrome |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Enhancement | CC: | chrome |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | All |
chrome
How about implementing a "batch-mode" for DOM-changes? It should collect changes to layout etc., suppress rendering and do all rendering when batch mode is ended. This should speed up rendering for a huge amount of scenarios afaik:
document.engine.batch=true;
element.width=100
element.height=100
...
document.engine.batch=false;
...
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
I'm pretty sure WebKit doesn't do layout or rendering in this scenario. It's only performed after script execution finishes, or when it's necessary for further processing (e.g. if the script asks for element size).
chrome
I agree, but I am still wondering what is the "slow" part, calculating sizes or putting things on screen? If it's "drawing" a batch-mode would still have some effect.
I see that this might break webkits rendering logic and isn't easy or even useful to implement.
All this told me that keeping sizes in my script and reusing them as much as possible, is the only way to squeeze out some speed. This answers some questions I had asked in several related groups, but didn't get an answer. Thank you.