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

10X performance improvement by re-using iframe #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

10X performance improvement by re-using iframe #20

wants to merge 2 commits into from

Conversation

brucejo75
Copy link

@brucejo75 brucejo75 commented Aug 31, 2017

See #6 & #19.

Re-using the iFrame boosted the performance significantly.

The implementation:

  1. caches the iframe.
  2. makes sure the window context of the iframe is left clean after use.

Passed all tests, run as described in #11.

I have an application that calls vm.runInNewContext 100's of time per display loop. Recreating and inserting the iframe is killing performance. Much better with a cached iframe

glutamate pushed a commit to saltcorn/saltcorn that referenced this pull request Jun 22, 2024
* added vm-browserify code as explicit mock

* added cached iframe see #20
- browserify/vm-browserify#20

* copy my vm mock before calling webpack

* clear content div before navigation
- this stops all running scripts in the iframe
- sometimes background scripts delay the actual navigation
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.

1 participant