-
Notifications
You must be signed in to change notification settings - Fork 425
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
Dev/small speedup to test if we changed right thing #3977
Dev/small speedup to test if we changed right thing #3977
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
export class Coin { | ||
public static parse(str: string): Coin { | ||
const re = new RegExp("([0-9]+)[ ]*([a-zA-Z]+)$"); | ||
const execed = re.exec(str); |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
library input
} | ||
|
||
export function isValidDecimalString(str: string): boolean { | ||
return regexDecString.test(str); |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
This
regular expression
library input
Confirmed this is speeding up the right spot. That first commit dropped the IntPretty constructor time down by 8%. Will proceed going for more significant reductions |
Its hard to apples to apples compare across feature branches (And that the numbers are way different than what I get on stage) but at least on a profile before and after the last commit, i got what appears to be a 3x speedup on the IntPretty load times. (Many IntPretty clones were called before, but now we save expensive dec logic in each) If its possible would like to get to prod and measure whats the impact. I'll continue with some more slight improvements around, but I think this is likely an 80-20 for impact. Of the 4.4s refresh time I saw on main, this should eliminate at least 2s. I'd like to rebenchmark to see if more was removed |
Last commit fixes remaining excess string calls / allocs in the IntPretty initializer. Not seeing more math loading time on feature branch refreshes. Will check more on main app once we merge this in though But I currently think remaining speed improvements will now lie elsewhere |
Start speeding up IntPretty/PricePretty constructors which are shown to be quite expensive in prod.
This is trying to first initially validate if this is editing the right spot (as profiles look fairly different on vercel preview vs prod), before going for larger wins.