Skip to content

Export ensurePerformance so PLATFORM.performance can be used without initializing jsdom#31

Merged
EisenbergEffect merged 1 commit intoaurelia:masterfrom
timfish:export-ensureperformance
Oct 20, 2018
Merged

Export ensurePerformance so PLATFORM.performance can be used without initializing jsdom#31
EisenbergEffect merged 1 commit intoaurelia:masterfrom
timfish:export-ensureperformance

Conversation

@timfish
Copy link
Contributor

@timfish timfish commented Oct 19, 2018

aurelia-store uses PLATFORM.performance to time and output performance data. When using the store in nodejs, the full aurelia-pal-nodejs initialize(), results in 6MB of JavaScript being bundled including jsdom.

This change should allow us to init PLATFORM.performance on nodejs without bringing in all the other dependencies.

Related aurelia-store issue:
aurelia/store#66

@EisenbergEffect
Copy link
Contributor

@timfish Was startoffset just an old, unused variable that never got cleaned up as far as you can tell?

@timfish
Copy link
Contributor Author

timfish commented Oct 20, 2018

@EisenbergEffect yes, startoffset wasn't used so I took the opportunity to remove it.

It looks like perf_hooks might be able to replace lots of this when node v10 becomes more mainstream: https://nodejs.org/api/perf_hooks.html

@EisenbergEffect EisenbergEffect merged commit e90002c into aurelia:master Oct 20, 2018
@EisenbergEffect
Copy link
Contributor

Thanks @timfish ! Also, I'd love if you could share a bit with @zewa666 about how you're using Aurelia Store in Node.js. I'm sure the use case would help him as he continues to build Aurelia Store and as we port it to Aurelia vNext as well.

@zewa666
Copy link
Member

zewa666 commented Oct 21, 2018

We had already a fair amount of conversation. This PR being a part of putting the plugin on a diet

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.

3 participants