Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

zodern
Copy link
Contributor

@zodern zodern commented Jul 28, 2021

Re-implements one of the optimizations from #246 that was removed.

Reduces the time spent by runSetters when running import { Web, Add } from '@material-ui/icons/esm/index.js'; from ~15-20 seconds down to less than 1. In the Svelte example, this would reduce the time spent by runSetters to around 4ms from the current 32ms.

@zodern zodern mentioned this pull request Aug 6, 2021
12 tasks
I believe this preserves the intent and semantics of PR benjamn#291, but with a
slightly simpler mechanism for obtaining any newly added setter keys
without iterating over all existing setters.
Copy link
Owner

@benjamn benjamn left a comment

Choose a reason for hiding this comment

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

@zodern Thanks for bringing this idea back as a separate PR, and sorry for the long wait!*

Please give my refactoring a look and let me know if it preserves your intentions. Also, I'm imagining my changes will be performance-neutral, but you might want to run your measurements again, just to be sure.

If everything looks good to you, I'm happy to release this tomorrow/soon!

* If I'm being honest, it took me a few weekend attempts to get fully back into the context of this codebase, which certainly wasn't helped by the lack of TypeScript types. If you (or anyone else) has an interest in converting this codebase to TypeScript (and using tsc to transpile it all the way back to pre-const ES5), I'm definitely open to that.

@zodern
Copy link
Contributor Author

zodern commented Aug 28, 2021

@benjamn the changes look good, and the performance is similar.

If I create any more PR's I will consider adding types.

@benjamn benjamn merged commit cc31a20 into benjamn:master Aug 28, 2021
benjamn added a commit that referenced this pull request Aug 28, 2021
I believe this preserves the intent and semantics of PR #291, but with a
slightly simpler mechanism for obtaining any newly added setter keys
without iterating over all existing setters.
@benjamn
Copy link
Owner

benjamn commented Aug 28, 2021

@zodern I've published these changes in [email protected] (aka reify@next). Happy to promote latest whenever (otherwise… sometime soon). Thanks again for these significant improvements!

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