-
Notifications
You must be signed in to change notification settings - Fork 42
Improve extension size and performance #52
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
Conversation
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.
That's pretty cool! Thanks for contributing. I'll have a look on how this works over the weekend (hopefully) and then I can merge that.
Looks like upgrading VSCode engine to 1.60 broke the tests.
Well, apparently there is no |
That’s very strange, it was building fine for me. Sadly I’m not at my machine at the moment but I will take a look when I get some time. I should be able to look on Monday |
Ok, I'll try to figure it out on my own in the meantime. Take care. Update: seems like it builds just fine on WSL so it must be a Windows issue - I guess you were running this on Linux? Still the tests are not running locally but for the very same reason so at least it's easy to reproduce. |
I’m sure I was on windows 11 when building (non-WSL) what version of Node are you using? |
I was on node v14.16, then upgraded to v16 but still the same. |
Ok, I know why the tests are not running - it requires some adjustments which I have done on my end but to my surprise most of them failed. I ran the extension then and figured I can't see any postfix templates showing and then I remembered why I didn't bundle this extension earlier. See this: vscode-postfix-ts/src/utils/templates.ts Lines 14 to 21 in 7f97847
They are being loaded file based which does not make any sense after bundling :( I see two solutions here, either it's relatively easy to exclude a folder from being bundled or rework the part which loads all the templates so that it does not depend on files. I'll try to do the latter as this should be easy as well and is more reliable solution. |
Ok, figured out how to bring back the templates to work again. This part was fairly easy. Still the problem with tests remains. |
I know it's been a while but I remembered about that today and had some time to dig in. I've got the tests green: https://github.com/ipatalas/vscode-postfix-ts/runs/6538582789?check_suite_focus=true Initially I thought it was vscode engine bump which caused it to fail but apparently it was the bundler. I haven't found any proper solution for that yet so for now I have a workaround for tests - just don't use bundled version for tests ;) |
Before:
58.4 MB (61,314,657 bytes)
201ms startup time
After:
3.43 MB (3,607,464 bytes)
32ms startup time