Closed MitchellMarkGeorge closed 2 years ago
Hello, I would like to contribute on this
@VladBrok got right ahead! If you need any more context please reach out!
While #25 has been completed, I will leave this open for a bit in case we do some more work related to this.
Is your feature request related to a problem? Please describe. This isn't really a feature but after doing some (investigation)[https://leanylabs.com/blog/js-forEach-map-reduce-vs-for-for_of/], I found that methods like
forEach
andmap
are pretty slow. I have noticed this is affecting things like on-install injection. This is really important as we are potentially dealing with huge arrays.Describe the solution you'd like I would like to migrate some some
forEarch
andmap
usage in the project to traditional for loops to squeeze out as much performance as possible. I will start with thegetTabsInCurrentWindow()
method inbackground/utils
as that is an essential part of the tab search.Describe alternatives you've considered I have looked at
for/in
andfor/of
loops and they do perform quite well. I will keep them in mind when implementing a solution.Additional context Refer to this link for more details: https://leanylabs.com/blog/js-forEach-map-reduce-vs-for-for_of/