Closed
Conversation
Currently reactoron only tests field if it is a string but this does not work well if `tron.log` is called with arrays or objects. This change tries to stringify value and test it against search condition.
67bea62 to
e8e2542
Compare
Author
|
well maybe that's a bit brute force solution. I could change it to traverse structures deeply but imo stringify is better since it's actually filtering by keys in objects |
Member
|
Thanks for this idea. This is probably a long time coming... closing this in favor of #1417. I'm going to have some people test it out and see if this adversely affects performance or not. And if not, we'll merge it. This should make timeline searching much better! |
markrickert
added a commit
that referenced
this pull request
Feb 16, 2024
This PR adapts @maxkomarychev's pull request #1181. The codebase has changed significantly since the PR was opened so this is a reimplementation of that same idea: if it's a string, search it. if it's not, try to stringify the object and search that string for whatever the user has typed into the timeline search box. Can I get a couple reviewers to try this out with like an hours worth of reactotron timeline logs to see if this adversely affects performance in a real-world environment with lots of logs to search? Before:  After: 
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently reactoron only tests field if it is a string but this does not
work well if
tron.logis called with arrays or objects.This change tries to stringify value and test it against search
condition.