Skip to content

Conversation

@paulirish
Copy link
Member

i was running some -A runs and it felt quite slow. Turns out the createConfig times are ~500ms and most of that is in the getIcuMessageFn stuff.

I tried memoizing and the results are pretty excellent

node ./lighthouse-cli --quiet -A=./lighthouse-core/test/results/artifacts --config-path=./lighthouse-core/test/results/sample-config.js --output=json --output-path=./lighthouse-core/test/results/sample_v2.json; 
node -e "t = require('./lighthouse-core/test/results/sample_v2.json'); console.log(t.timing.entries.filter(e => e.name === 'lh:config').at(-1).duration)"
# this branch
436.51
160.34
157.83
161
156.81

# master
848.99
534.13
532.56
545.76
526.82

@paulirish paulirish requested a review from a team as a code owner May 19, 2022 00:32
@paulirish paulirish requested review from adamraine and removed request for a team May 19, 2022 00:32
};

return getIcuMessageFn;
return memoize(getIcuMessageFn);
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we lose types with this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@brendankenny
Copy link
Contributor

what ends up slowing it down? is it the formatters?

@brendankenny
Copy link
Contributor

what ends up slowing it down? is it the formatters?

no, it's intl-messageformat parsing

@paulirish
Copy link
Member Author

superceded by #14030

@paulirish paulirish closed this May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants