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

Further improve performance of Document creation. #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bmeurer
Copy link
Contributor

@bmeurer bmeurer commented Feb 3, 2019

This speeds up the create test by about 25-30% by avoiding the call
to util.assign() in the createDocument() function. Instead of that
Document#document is now an accessor on the prototype, defaultView
is an instance of a new DefaultView class, whose instances have links
to the document, and finally the interesting constructors that are
exposed via Document instances are all installed on the Document and
DefaultView prototypes instead of the instances.

This speeds up the create test by about **25-30%** by avoiding the call
to `util.assign()` in the `createDocument()` function. Instead of that
`Document#document` is now an accessor on the prototype, `defaultView`
is an instance of a new `DefaultView` class, whose instances have links
to the `document`, and finally the interesting constructors that are
exposed via `Document` instances are all installed on the `Document` and
`DefaultView` prototypes instead of the instances.
andrewiggins added a commit to andrewiggins/undom that referenced this pull request Nov 1, 2020
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.

None yet

2 participants