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

Webworker in iframe #819

Merged
merged 9 commits into from Jun 7, 2019
Merged

Webworker in iframe #819

merged 9 commits into from Jun 7, 2019

Conversation

@AquiGorka
Copy link
Contributor

@AquiGorka AquiGorka commented May 31, 2019

Adds extra sandboxing to webworkers by executing them in iframe.

@bpierre
Copy link
Contributor

@bpierre bpierre commented Jun 4, 2019

Looking good! We should also provide a way to clean the things created by this class (event listener and injected element). Did you notice any change in terms of performances?

@AquiGorka AquiGorka force-pushed the feature/webworker-in-iframe branch from 0ae8b16 to 8644019 Jun 5, 2019
@AquiGorka
Copy link
Contributor Author

@AquiGorka AquiGorka commented Jun 5, 2019

We should also provide a way to clean the things created by this class (event listener and injected element).

Done. 😄

Did you notice any change in terms of performances?

Did not do any benchmark nor profiling, locally feels the same, did load anv and it worked fast. We should ask @sohkai to perform the tests he was doing in the experiments here to see if this affects performance.

src/iframe-worker.js Outdated Show resolved Hide resolved
2color
2color approved these changes Jun 7, 2019
Copy link
Contributor

@2color 2color left a comment

LGTM. I tested and there were no noticeable performance regressions.

@2color
Copy link
Contributor

@2color 2color commented Jun 7, 2019

@AquiGorka One last question, who calls terminate?

@AquiGorka
Copy link
Contributor Author

@AquiGorka AquiGorka commented Jun 7, 2019

@bpierre
Copy link
Contributor

@bpierre bpierre commented Jun 7, 2019

@AquiGorka One last question, who calls terminate?

We should call it from here: https://github.com/aragon/aragon/blob/feature/webworker-in-iframe/src/aragonjs-wrapper.js#L405

So that it gets cleaned when needed: https://github.com/aragon/aragon/blob/feature/webworker-in-iframe/src/App.js#L199

Loading another DAO probably doesn’t work in the current state?

Edit: oh right, I missed that @AquiGorka

bpierre
bpierre approved these changes Jun 7, 2019
Copy link
Contributor

@bpierre bpierre left a comment

💯

@AquiGorka AquiGorka merged commit e9a6b24 into master Jun 7, 2019
5 of 8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the feature/webworker-in-iframe branch Jun 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants