Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Log viewer performance does not scale well

Log viewer performance does not scale well

Scheduled Pinned Locked Moved Support
logs
9 Posts 4 Posters 1.6k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Robin
    wrote on last edited by girish
    #1

    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).

    nebulonN 1 Reply Last reply
    1
    • R Robin

      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).

      nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      @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 -f in a native terminal will nearly always be better.

      1 Reply Last reply
      1
      • robiR Offline
        robiR Offline
        robi
        wrote on last edited by
        #3

        How can we get the equivalent of a a tail -n 200 + tail -fas the input to the log viewer?

        Conscious tech

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #4

          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.

          robiR 1 Reply Last reply
          0
          • girishG girish

            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.

            robiR Offline
            robiR Offline
            robi
            wrote on last edited by
            #5

            @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?

            Conscious tech

            girishG 1 Reply Last reply
            0
            • robiR robi

              @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?

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #6

              @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).

              robiR 1 Reply Last reply
              0
              • girishG girish

                @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).

                robiR Offline
                robiR Offline
                robi
                wrote on last edited by robi
                #7

                @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.

                Conscious tech

                girishG 1 Reply Last reply
                0
                • robiR robi

                  @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.

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #8

                  @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 🙂

                  robiR 1 Reply Last reply
                  0
                  • girishG girish

                    @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 🙂

                    robiR Offline
                    robiR Offline
                    robi
                    wrote on last edited by
                    #9

                    @girish lol, "Just do it!" 😉

                    Conscious tech

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search