Can this function be improved performance wise?
I am using a function to wrap part of texts that contains links, emails and urls with a component that links you in the appropriate way in React Native but since this could be used for rather long texts I am wondering if you see any potential performance improvements that could be made?
6 Replies
maybe something like this
Would this really be more performant when it's assigning extra memory for each word?
if you wan't for performance
you should start using memo's
Yeah I will likely memoize it since this could technically be a text with thousands of characters.
But more wondering on the function itself if there's any ways to optimize it?
only testing and checking the memory graph and such you can find the most optimal performance
but most of the time you will have to tradeoff something
Mainly looking for if there is something to improve the time complexity of it I guess.