Skip to content
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

Ensure that parsing HTML doesn't trigger a reflow for each child appended #1269

Closed
jdm opened this issue Nov 16, 2013 · 5 comments
Closed

Ensure that parsing HTML doesn't trigger a reflow for each child appended #1269

jdm opened this issue Nov 16, 2013 · 5 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Nov 16, 2013

Since we now call AppendChild in the parser, it's possible that this is the case.

@bzbarsky
Copy link
Contributor

@bzbarsky bzbarsky commented Nov 17, 2013

AppendChild shoudn't be triggering reflow on its own in any case, right?

@jdm
Copy link
Member Author

@jdm jdm commented Nov 17, 2013

Well, it calls content_changed on the document, which could do anything it wanted but right now requests a reflow unconditionally.

@bzbarsky
Copy link
Contributor

@bzbarsky bzbarsky commented Nov 17, 2013

That seems wrong, sure, but nothing is special about the parser there, right?

@jdm
Copy link
Member Author

@jdm jdm commented Nov 17, 2013

Correct.

@mbrubeck mbrubeck self-assigned this Oct 17, 2014
mbrubeck added a commit to mbrubeck/servo that referenced this issue Oct 17, 2014
This fixes a performance regression caused by the previous patches.  Once we
allowed script and layout to run during parsing, it was running too often
(every time the document changed and called window.reflow).

Fixes servo#1269.
mbrubeck added a commit to mbrubeck/servo that referenced this issue Oct 17, 2014
This fixes a performance regression caused by the previous patches.  Once we
allowed script and layout to run during parsing, it was running too often
(every time the document changed and called window.reflow).

Fixes servo#1269.
mbrubeck added a commit to mbrubeck/servo that referenced this issue Oct 18, 2014
This fixes a performance regression caused by the previous patches.  Once we
allowed script and layout to run during parsing, it was running too often
(every time the document changed and called window.reflow).

Fixes servo#1269.
mbrubeck added a commit to mbrubeck/servo that referenced this issue Oct 21, 2014
This fixes a performance regression caused by the previous patches.  Once we
allowed script and layout to run during parsing, it was running too often
(every time the document changed and called window.reflow).

Fixes servo#1269.
@brunoabinader
Copy link
Contributor

@brunoabinader brunoabinader commented Oct 23, 2014

@jdm, this seems to be a good use case for specializing content_changed :)

mbrubeck added a commit to mbrubeck/servo that referenced this issue Oct 27, 2014
This fixes a performance regression caused by the previous patches.  Once we
allowed script and layout to run during parsing, it was running too often
(every time the document changed and called window.reflow).

Fixes servo#1269.
mbrubeck added a commit to mbrubeck/servo that referenced this issue Oct 29, 2014
This fixes a performance regression caused by the previous patches.  Once we
allowed script and layout to run during parsing, it was running too often
(every time the document changed and called window.reflow).

Fixes servo#1269.
mbrubeck added a commit to mbrubeck/servo that referenced this issue Oct 29, 2014
This fixes a performance regression caused by the previous patches.  Once we
allowed script and layout to run during parsing, it was running too often
(every time the document changed and called window.reflow).

Fixes servo#1269.
@mbrubeck mbrubeck closed this in f39e01b Oct 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.