Skip to content

Comments

feat: deep search#1181

Closed
maxkomarychev wants to merge 1 commit intoinfinitered:masterfrom
maxkomarychev:deep-search
Closed

feat: deep search#1181
maxkomarychev wants to merge 1 commit intoinfinitered:masterfrom
maxkomarychev:deep-search

Conversation

@maxkomarychev
Copy link

@maxkomarychev maxkomarychev commented Mar 24, 2020

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.

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.
@maxkomarychev
Copy link
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
lmk if that's good, thanks :)

@markrickert
Copy link
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: 


![before](https://github.com/infinitered/reactotron/assets/139261/3350197c-4417-427b-ae9a-78d2fd322d6c)

After:


![after](https://github.com/infinitered/reactotron/assets/139261/9cc4a2e2-6d47-4891-b97e-0992cca6e7d6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants