Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Collapse job data #529

Closed
sroettering opened this issue Feb 1, 2023 · 12 comments
Closed

Feature request: Collapse job data #529

sroettering opened this issue Feb 1, 2023 · 12 comments
Labels
enhancement New feature or request

Comments

@sroettering
Copy link

I have queues with large payloads and the bull board pages load very slowly. I did not investigate why it is so slow. I suspect rendering the job data as json takes for ever. Thus it would be nice if large objects/arrays would be auto-collapsed when rendering (similar to collapsing code lines in IDEs). This would also make job data more readable because you don't have to scroll down thousands of lines to see the properties that come after these big chunks. So collapsible json would be a nice regardless if it fixes the performance or not.

@felixmosh felixmosh added the enhancement New feature or request label Feb 1, 2023
@felixmosh
Copy link
Owner

felixmosh commented Feb 1, 2023

It probably will solve the performance issue, since highlighting large json is a demanding task, but It should be only a UX consideration.

If your json data is huge, you should use data formatter in order to reduce the size of the JSON, the app won't be able to reduce it for you.

But this is totally a nice UX optimization, it should be settings configurable.

@bennet-esyoil
Copy link

I face the same issue.

I write a lot of data and some payloads are huge and they completely break the Dashboard. Even when they are not being processed anymore or they should be on the second page, I cannot get it to load without my Browser killing the tab.

Only solution to make it usable again currently is to just kill the redis-container, delete and recreate it, which works and is fine in this use-case, but probably not in others.

@felixmosh
Copy link
Owner

@bennet-esyoil did you tried the data formatter, in order to reduce the data payload?

@bennet-esyoil
Copy link

bennet-esyoil commented Feb 6, 2023

That could be a option. I'll need to figure out first if the data needs to be shown there, normally I wouldn't want to check each entry in the queues, but for debugging it's perfect.

Anyways, I'll talk back with my team and see if it's a viable option. Thanks for the suggestion.

Update: I was able to implement the data-formatter and just remove the huge elements. We do not really have the need to visualize it at that point, and can still get it back later if we decide to. So yep, the data-formatter is the correct solution in my case.

@Twisterking
Copy link

We are running into the same issue here!
We have very big payloads and bull-board is basically unuseable to us, as the browser just crashed because the DOM can't render the big JSONs!

My recommendation would be to just create a setting (in the top right menu), where you can collapse the JSONs by default. Like this, hopefully, the DOM should not crash and it is then the user's job to just open the JSON (job data) for a single job as needed.

@felixmosh
Copy link
Owner

@Twisterking will able to prepare a PR for this?

@Twisterking
Copy link

Maybe, not sure yet! I was not aware of the queueAdapter.setFormatter() option, so we might be using just that and be happy with it! 👍

@felixmosh
Copy link
Owner

I'll add an additional optimization which will use webworker if available for highlighting code

@felixmosh
Copy link
Owner

@sroettering can you test v4.12.1 which includes web worker highlight & collapse functionality (enabled from settings).
Try your heavy queue pls :]

@sroettering
Copy link
Author

At first glance it looks very nice! Would have expected to be able to collapse the data again, but I guess it's ok like this. Performance is also good in my first test.
Thanks for the quick implementation. I will open more feature requests soon :-)

@felixmosh
Copy link
Owner

Did you tested the board without the collapse state?
Is it much better?

@sroettering
Copy link
Author

yes, it's much better now. Also the paging is really fast as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants