Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Using with large json inputs is painfully slow #11

Open
ircmaxell opened this issue Aug 6, 2018 · 6 comments
Open

Using with large json inputs is painfully slow #11

ircmaxell opened this issue Aug 6, 2018 · 6 comments

Comments

@ircmaxell
Copy link

The entire application is slowed by large inputs. I am working with a 6mb json file, and each keystroke takes about 500ms to register. I could understand not outputting the results in real-time, but I would suggest separating the UI from the data gathering portions (use a separate UI rendering goroutine)...

@fiatjaf
Copy link
Owner

fiatjaf commented Aug 6, 2018

Yes, that would be a good idea. Unfortunately I don't understand the UI of this thing, I just forked it and changed the json filtering engine to use jq. A PR would be very welcomed.

@Whoaa512
Copy link

How bout swapping out the exec bit for a pure Go implementation of jq

https://github.com/itchyny/gojq

@fiatjaf
Copy link
Owner

fiatjaf commented Jun 13, 2020

I was thinking of doing that, but I don't think it will improve things by a lot. https://github.com/fiatjaf/jqview uses that and it's painfully slow for big JSON files anyway. Apparently gojq is much slower than raw jq.

I think separating the UI from the JSON processing and also adding some form of debounced typing would improve things more here.

Meanwhile it continues serving as a tool for small and medium JSON analysis only.

@bayeslearner
Copy link

I have a json file about 10M.
Why is it so slow to move cursor around to change the query? I haven't done programming for a while, but can you put the computation and the UI in different threads or something?

@fiatjaf
Copy link
Owner

fiatjaf commented Oct 11, 2020

Yes, it is possible, but I don't know how to do it because everything revolves around this TUI library I inherited from jid and don't know how to use.

@coxley
Copy link

coxley commented Jun 26, 2023

At a minimum, debouncing should resolve a lot of the pain. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants