Forum
    • Categories
    • Register
    • Login

    Custom workspace = slow HISE

    Scheduled Pinned Locked Moved General Questions
    51 Posts 3 Posters 5.0k Views
    Loading More Posts
    • 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.
    • David HealeyD
      David Healey
      last edited by David Healey

      New empty project here, 8 - 10 seconds to open. Maybe a GNU/Linux only issue?

      1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey
        last edited by

        I just tested on Windows and no problem there so I think it's specific to my OS and possibly to my general setup. I'll try on my other GNU/Linux system.

        1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey
          last edited by

          Definitely seems to be OS specific, I just tested on Linux Mint and had the same issue as my main Debian system.

          1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey
            last edited by

            Just tested on MacOS, works fine...

            1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart
              last edited by

              Try compiling the plugin version of HISE and then load it in a DAW and close reopen the window. If the lag is also happening there you know it's something related to the UI.

              David HealeyD 1 Reply Last reply Reply Quote 0
              • David HealeyD
                David Healey @Christoph Hart
                last edited by

                @Christoph-Hart Good thinking, I'll do that now

                1 Reply Last reply Reply Quote 0
                • David HealeyD
                  David Healey
                  last edited by

                  The plugin version doesn't seem to read from the same editorData file as the standalone version. Each time I open it it's reset to the default layout, even if I make changes to the layout in the plugin.

                  1 Reply Last reply Reply Quote 0
                  • David HealeyD
                    David Healey
                    last edited by

                    @Christoph-Hart I've narrowed it down. When I remove the API browser from my custom workspace everything works normally.

                    1 Reply Last reply Reply Quote 0
                    • David HealeyD
                      David Healey
                      last edited by David Healey

                      I'm digging up this thread again. I posted another thread recently where I mentioned HISE was laggy and I thought it might be down to Alder Lakes E/P cores. But I disabled all the P cores and it didn't make a difference.

                      So then I started wondering if it was the issue in this thread and it was caused by the API browser now being present in the sidebar. So I commented out the source code where that API browser is added, and bullseye, HISE opens instantly. It also closes instantly now too, I never noticed that was lagging also.

                      So @Christoph-Hart when you have a moment, please see if you can find out why the presence of the API browser causes HISE be super laggy on Linux.

                      1 Reply Last reply Reply Quote 0
                      • David HealeyD
                        David Healey
                        last edited by David Healey

                        I've looked into this further and the issue is related to the help text generation. If I comment out this line, HISE loads up quickly (but obviously I get no help text).

                        Could this data be cached so it doesn't have to recreated everytime HISE is opened?

                        David HealeyD 1 Reply Last reply Reply Quote 0
                        • David HealeyD
                          David Healey @David Healey
                          last edited by

                          @Christoph-Hart Got any ideas about this?

                          Christoph HartC 1 Reply Last reply Reply Quote 0
                          • Christoph HartC
                            Christoph Hart @David Healey
                            last edited by Christoph Hart

                            @d-healey Hmm, this is already "cached" in the sense that it just parses a compressed value tree containing the docs and creates a C++ object containing the formatting which shouldn't take too long.

                            Can you investigate further? Maybe it's time for you to learn how to use a profiler to find hotspots - this should give you an exact call stack of the heaviest calls including where it spends the most time so we can pinpoint it down to the font hinting algorithm (my guess here). I think the main one in Linux is valgrind but I've never used it and I can imagine there is some Linux-style extra nerd layer applied to its workflow :)

                            EDIT: This looks like the tools I'm using on Windows / macOS and allows you to attach the profiler to a running HISE build, so it might be easier to get running.

                            David HealeyD 1 Reply Last reply Reply Quote 0
                            • David HealeyD
                              David Healey @Christoph Hart
                              last edited by

                              @Christoph-Hart Thanks, I'll take a look and report back

                              1 Reply Last reply Reply Quote 0
                              • David HealeyD
                                David Healey
                                last edited by

                                Not exactly sure what I'm looking for but this stuff is eating some CPU when the API thingy isn't commented out.

                                Screenshot from 2023-03-15 17-57-16.png

                                Christoph HartC 1 Reply Last reply Reply Quote 0
                                • Christoph HartC
                                  Christoph Hart @David Healey
                                  last edited by

                                  @d-healey yup, looks font related (libfreetype seems to be the font library on Linux). Can you check the call stack for this call?

                                  1 Reply Last reply Reply Quote 0
                                  • David HealeyD
                                    David Healey
                                    last edited by

                                    3b5d6830-fbfb-4d89-8bf9-2342721dfb73-image.png

                                    86652310-2b74-4c85-814c-7101da7d830c-image.png

                                    1 Reply Last reply Reply Quote 0
                                    • David HealeyD
                                      David Healey
                                      last edited by David Healey

                                      This post is deleted!
                                      1 Reply Last reply Reply Quote 0
                                      • David HealeyD
                                        David Healey
                                        last edited by David Healey

                                        Ah I think I finally worked out how to see some useful data. Does this help?

                                        1a25435e-3bb3-435f-9f4b-bff469b0752e-image.png

                                        Digging further. It seems to be all these help. commands in CodeEditorApiBase.cpp

                                        88e064ac-f272-4264-8fae-00e83f29e63c-image.png

                                        Christoph HartC 1 Reply Last reply Reply Quote 0
                                        • Christoph HartC
                                          Christoph Hart @David Healey
                                          last edited by

                                          @d-healey it looks like it‘s not caching the fonts so it destroys them everytime…

                                          David HealeyD 1 Reply Last reply Reply Quote 0
                                          • David HealeyD
                                            David Healey @Christoph Hart
                                            last edited by

                                            @Christoph-Hart Could this be related? https://forum.juce.com/t/slow-startup-due-to-font-enumeration/6864

                                            Christoph HartC 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            21

                                            Online

                                            2.1k

                                            Users

                                            13.0k

                                            Topics

                                            112.4k

                                            Posts