Log viewer performance does not scale well
-
If an app outputs a reasonable volume of logging (let's say, a few hundred lines), the performance of a browser tab viewing those logs seems to bog down pretty seriously over time.
I don't know for sure how the viewer is implemented, but if it's trying to keep the entire log content loaded, that might be a problem with some more chatty apps. And if it's trying to keep it all in the DOM, that's also perhaps a problem.
I imagine this isn't an easy problem to solve, just thought I'd report it

(I'm using Firefox if it matters).
-
If an app outputs a reasonable volume of logging (let's say, a few hundred lines), the performance of a browser tab viewing those logs seems to bog down pretty seriously over time.
I don't know for sure how the viewer is implemented, but if it's trying to keep the entire log content loaded, that might be a problem with some more chatty apps. And if it's trying to keep it all in the DOM, that's also perhaps a problem.
I imagine this isn't an easy problem to solve, just thought I'd report it

(I'm using Firefox if it matters).
@robin This is exactly how it is implemented and indeed not very smart but simple. I've done a couple of basic approaches to fix this, but it gets hard quickly and thus resorted to "just reload the browser for now"
Also as a workaround during app packaging, where one might want to keep a long backlog, using the
cloudron logs -fin a native terminal will nearly always be better. -
I run into this often in development. In fact, sometimes it freezes firefox entirely

On a side note, I also don't like that the apptask logs and app logs are interleaved and thus appear out of order. This is mostly a limitation of our logging system.
-
I run into this often in development. In fact, sometimes it freezes firefox entirely

On a side note, I also don't like that the apptask logs and app logs are interleaved and thus appear out of order. This is mostly a limitation of our logging system.
@girish said in Log viewer performance does not scale well:
On a side note, I also don't like that the apptask logs and app logs are interleaved and thus appear out of order. This is mostly a limitation of our logging system.
can they be tagged differently?
-
@girish said in Log viewer performance does not scale well:
On a side note, I also don't like that the apptask logs and app logs are interleaved and thus appear out of order. This is mostly a limitation of our logging system.
can they be tagged differently?
@robi yes. they are in different files - app.log and apptask.log . we were lazy and just do
tail -f apptask.log app.log. But what needs to happens is to read each file line by line and order the log lines based on the timestamp. This is only a problem for content already existing in the log files. When new log lines get added, it will interleave correctly (because of how tail works). -
@robi yes. they are in different files - app.log and apptask.log . we were lazy and just do
tail -f apptask.log app.log. But what needs to happens is to read each file line by line and order the log lines based on the timestamp. This is only a problem for content already existing in the log files. When new log lines get added, it will interleave correctly (because of how tail works).@girish sounds like you need a time tag to help sync the previous logs too. Like the "clap" used in in audio/video.
Or perhaps be even more clever, and cat the files into a temp file thats aligned, which is then appended by the tail -f.
Using a ring buffer to avoid excessive memory usage.
-
@girish sounds like you need a time tag to help sync the previous logs too. Like the "clap" used in in audio/video.
Or perhaps be even more clever, and cat the files into a temp file thats aligned, which is then appended by the tail -f.
Using a ring buffer to avoid excessive memory usage.
-
@robi we have the time tag too (it's on each line) . we just have to sort it, but it's not annoyed me enough yet to do it

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
