Skip to content
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

[$500] [HOLD for payment 2024-03-07] [Performance] Use Intl Collator instead of the string localeCompare #36795

Closed
mountiny opened this issue Feb 19, 2024 · 17 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Task

Comments

@mountiny
Copy link
Contributor

mountiny commented Feb 19, 2024

Coming from Slack

### Problem
Lots of app critical metrics (TTI, input delay etc.) are hindered because of weak performance inside Prototype.string.localeCompare function in Hermes engine.

### Solution
Based on Hur's investigations, we can improve performance by swapping out localeCompare with Intl.Collator implementation.

More details are available in the linked analysis issue.

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01af6fd0b61753f3bb
  • Upwork Job ID: 1765747002690428928
  • Last Price Increase: 2024-03-07
@kacper-mikolajczak
Copy link
Contributor

Hi @mountiny 👋

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 19, 2024
@mountiny
Copy link
Contributor Author

Follow up from the PR:

  • create uni tests for the new util libs
  • create a plan to remove the string.localeCompare from other parts of the app

@kacper-mikolajczak would look into this tomorrow

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Feb 20, 2024
@kacper-mikolajczak
Copy link
Contributor

kacper-mikolajczak commented Feb 20, 2024

create uni tests for the new util libs

PR for tests: #36879

create a plan to remove the string.localeCompare from other parts of the app

With this, I will wait till we have 100% sure that there are no regressions and actual performance gains in the app. What do you think @mountiny ?

@mountiny
Copy link
Contributor Author

I will wait till we have 100% sure that there are no regressions and actual performance gains in the app

We can wait a bit, we saw that there are performance gains in the tests and your analysis. How do you want to measure that there are some improvements thanks to this?

@kacper-mikolajczak
Copy link
Contributor

We can wait a bit, we saw that there are performance gains in the tests and your analysis.

If that is enough of evidence, we can swap out other occurrences as well (additionally ensuring that we don't introduce any regressions). I can prepare PR for that 👍

How do you want to measure that there are some improvements thanks to this?

The next phase of the audit (Control phase) will add specific metrics and perf tests to keep the performance at stable level.

@mountiny
Copy link
Contributor Author

The next phase of the audit (Control phase) will add specific metrics and perf tests to keep the performance at stable level.

Yeha I dont think we would want to wait this long for that

@adhorodyski
Copy link
Contributor

@mountiny Agree, we should integrate this right away. I'm OOO tomorrow but we'll sync up internally on how to address this! It definitely needs to stay in check, this function runs ~250k times during the startup if I recall correctly :)

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Feb 21, 2024
@hoangzinh
Copy link
Contributor

hoangzinh commented Mar 7, 2024

@mountiny the PR has been deployed to Prod since last week. Could you help to add Bug label or Feature so a BZ member can be added to process payment? Thanks

@mountiny mountiny added NewFeature Something to build that is a new item. Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Mar 7, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 7, 2024
Copy link

melvin-bot bot commented Mar 7, 2024

@mountiny mountiny changed the title [Performance] Use Intl Collator instead of the string localeCompare [HOLD for payment 2024-03-07] [Performance] Use Intl Collator instead of the string localeCompare Mar 7, 2024
@mountiny mountiny added Daily KSv2 and removed Weekly KSv2 labels Mar 7, 2024
@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Mar 7, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-03-07] [Performance] Use Intl Collator instead of the string localeCompare [$500] [HOLD for payment 2024-03-07] [Performance] Use Intl Collator instead of the string localeCompare Mar 7, 2024
Copy link

melvin-bot bot commented Mar 7, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01af6fd0b61753f3bb

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 7, 2024
Copy link

melvin-bot bot commented Mar 7, 2024

Current assignee @hoangzinh is eligible for the External assigner, not assigning anyone new.

@mountiny mountiny removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 7, 2024
@mountiny
Copy link
Contributor Author

mountiny commented Mar 7, 2024

@zanyrenney this is ready for payment $500 to @hoangzinh

@zanyrenney
Copy link
Contributor

please apply to the job on upwork @hoangzinh

@hoangzinh
Copy link
Contributor

Applied. Thanks @mountiny @zanyrenney

@zanyrenney
Copy link
Contributor

sent offer

@hoangzinh
Copy link
Contributor

Accepted. Thanks @zanyrenney

@zanyrenney
Copy link
Contributor

payment summary

paid $500 via upwork to @hoangzinh

@github-project-automation github-project-automation bot moved this from CRITICAL to Done in [#whatsnext] #quality Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Task
Projects
Development

No branches or pull requests

5 participants