evolutions-webapp icon indicating copy to clipboard operation
evolutions-webapp copied to clipboard

Improve search by ID performace

Open anshumanv opened this issue 7 years ago • 3 comments

We are iterating over each object to match it's num, this is poor in terms if performance, please improve it.

  • [x] I ensure that this issue is not a duplicate of any current open issues(s).
  • [ ] Assign this issue to me (I want to work on this).
  • [ ] I will send my PR only after I'm assigned to this issue by any maintainer.
  • [ ] I understand that I will be unassigned from this issue if I fail to send a PR for this within a week.

anshumanv avatar Dec 12 '17 20:12 anshumanv

What is a different way it could be done?

sneakycrowllc avatar Dec 14 '17 01:12 sneakycrowllc

Well we can map the values to object and then do a BST over the numbers and retrieve back the chain we need.

Monal5031 avatar Dec 15 '17 21:12 Monal5031

I gave this a shot in #46. This was a really good case for using a lookup table.

dericcain avatar Oct 01 '18 13:10 dericcain