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

Delay some style computations until needed #278

Merged
merged 1 commit into from
Mar 29, 2019
Merged

Conversation

poire-z
Copy link
Contributor

@poire-z poire-z commented Mar 29, 2019

In DrawDocument() and elementFromPoint(), where we loop thru all the children of an element to check if their y is inside current page, compute only what's needed before tests that can return early.
This brings some speedup when turning pages on document that have thousands of small paragraphs in a single body/DocFragment.
Details and some profiling data in #277.

In DrawDocument() and elementFromPoint(), where we loop
thru all the children of an element to check if their y
is inside current page, compute only what's needed before
tests that can return early.
This brings some speedup when turning pages on document
that have thousands of small paragraphs in a single
body/DocFragment.
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple and effective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants