-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Update dependencies and use esbuild for bundling #303
Conversation
073704b
to
b24db9b
Compare
Thank you! Just on mobile right now, but concerning the JS bundler: I personally don't care too much about the speed of the bundling itself, but rather about the speed and size of the generated code. I don't know much about the process, but I guess there could be significant differences w.r.t. dead code elimination etc. I have some ideas for a few Insect benchmarks . So we could also postpone that decision until we have a quantitative measure available. Concerning the parsing speed improvement: Awesome! |
Oh and concerning spago: I'll leave that up to you. |
I read a bit about SWC, and I think it's not a good fit for Insect, as it seems to be a bit immature.
Can't say much about anything other than
Absolutely.
Sure, I'll think about it. I'll mark this PR as ready for review; feel free to take a closer look at the changes. |
ok
Oh, nice! I am currently using the
See #304 for a start. I benchmarked master
this branch
|
My gut tells me it's because everything is imported at the top in |
Also, just to clear up potential misunderstandings: |
No, right. But it does depend on the PureScript 0.15 changes and dependency upgrades (leading to faster parsing speed) and on the ES modules changes (
That could very well be the case! It would be great if we could try that. |
Yeah, exactly; I just wanted to make sure we're on the same page.
Then I'll do that in this PR soon, but I'll be taking a break from GitHub tomorrow and possibly the day after, so you'll have to wait some. :) |
Of course. Please note that on my projects, there is certainly never any time pressure - and you don't have to explain if there are any "delays".. however long they might be. Speaking of... would you be interested in joining me as a maintainer on this project? There are absolutely no obligations that come with this "role". I would add you to a "Maintainers" list in the README and give you admin permissions for this repo (and maybe purescript-quantities?). But only if you are interested. |
Okay, thanks, I understand that.
Sure, I'm honored to take on that "role." :D
Yeah, I am interested in being a maintainer of Insect and purescript-quantities. I might also add purescript-decimals to that list, but reluctantly, as I don't think there's much work to do on it. If you want to add me as a maintainer to purescript-decimals too though, then I'm also okay with that. |
Awesome! Welcome on board. For purescript-decimals, we also have @thomashoneyman as a collaborator/maintainer, but I invited you as well. |
Pleasure to work with you!
Ah, I wasn't aware of that. |
73323c7
to
1cb444d
Compare
Here are the results with
Here are the results with the same changes as this PR, but without dynamic imports in
Here are the results on
As you can see, dynamic imports definitely help things, but they don't get us even close to the performance of What shall we do now? Dig deeper into the cause(s)? P.S. I used |
I would appreciate that. But I'm okay with postponing this task and merging this for now. Definitely looking forward to all the other improvements in this PR! Let me know what you prefer. |
@sharkdp I'd prefer to merge this first so that we can be up-to-date with our dependencies, and then we can open an issue for the startup time regression. I just want to make an extra couple small changes to the PR and then we can go ahead and merge it. |
Sounds good! |
1cb444d
to
a60b461
Compare
@@ -236,6 +237,7 @@ normalUnitDict = Dictionary | |||
, Q.fortnight ==> ["fortnights", "fortnight"] | |||
, Q.month ==> ["months", "month"] | |||
, Q.year ==> ["years", "year"] | |||
, Q.julianYear ==> ["julianYears", "julianYear"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially added julianyear
and julianyears
to this list, but the unit is "prettified" in the REPL as julianYear
, and having both julianyear
and julianYear
is a very bad experience for completion.
I think I've done everything now, so you can go ahead and review/merge this PR. |
You may wonder why all these changes are done in one commit, and that's because they're all kind of interrelated: - I initially updated PureScript to 0.15.x, which produces code that uses ES modules instead of CommonJS ones - The version of `purescript-decimals` in the 0.15.x package set was tested with decimal.js 10.3.1, so use that - Since we're using ES modules now, I updated `clipboardy` and `xdg-basedir` to versions that use ES modules (I admit that I didn't have to do this one in this commit) - `pulp browserify` doesn't work with PureScript 0.15.x, so I had to migrate to something else (I chose `esbuild`) Side note: `purescript-parsing` 9.0.0 brings with it a wonderful performance boost[1], which speeds up the test suite by 3 times on my machine (from `102.231 s ± 0.485 s` to `34.666 s ± 0.299 s`). [1]: purescript-contrib/purescript-parsing#154
a60b461
to
2090a7d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you very much.
You may wonder why all these changes are done in one commit, and that's because they're all kind of interrelated:
purescript-decimals
in the 0.15.x package set was tested with decimal.js 10.3.1, so use thatclipboardy
andxdg-basedir
to versions that use ES modules (I admit that I didn't have to do this one in this commit)pulp browserify
doesn't work with PureScript 0.15.x, so I had to migrate to something else (I choseesbuild
)Side note:
purescript-parsing
9.0.0 brings with it a wonderful performance boost, which speeds up the test suite by 3 times on my machine. Before:npm test
After:
npm test
Feel free to review this, but I'm still considering some things:
esbuild
out of the box. This may be more suitable for another PR though.