-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: optimize match currencies #345
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
LGTM just a small suggestion
const matchers = patterns | ||
.filter((pattern) => pattern) | ||
.map((pattern) => picomatch(pattern)); |
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.
We can probably do both filtering and mapping in one loop
const matchers = patterns | |
.filter((pattern) => pattern) | |
.map((pattern) => picomatch(pattern)); | |
const matchers = patterns.reduce((filtered, pattern) => { | |
if (pattern) { | |
filtered.push(picomatch(pattern)); | |
} | |
return filtered; | |
}, []); |
I'm closing this PR for now, thanks for the work, I'm working on this right now and will provide another version with another fix and without breaking the order of |
Fix for this ticket
There was a big delay on the loading of live apps(buy, sell) and I have traced it back to this function's execution time. I have sped it up, it is working fine locally now.