HISE Logo Forum
    • Categories
    • Register
    • Login

    Ventura - UI lag

    Scheduled Pinned Locked Moved General Questions
    17 Posts 5 Posters 179 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.
    • HISEnbergH
      HISEnberg
      last edited by

      I am getting reports from some users on Ventura that the UI of my plugin has a lot of lag. I realized I forgot to disable the OpenGL flag when compiling, but other than that is this a known issue? I have three FFTs displays running at the same time (5 in total in the project, though I made sure to disable 2 of them when they are not used). I suspect these are the culprit but has anyone experienced this issue and have advice?

      A 1 Reply Last reply Reply Quote 0
      • A
        aaronventure @HISEnberg
        last edited by

        @HISEnberg Are you using blurs? What does Perfetto say when you do a trace?

        HISEnbergH orangeO 2 Replies Last reply Reply Quote 1
        • HISEnbergH
          HISEnberg @aaronventure
          last edited by

          @aaronventure Thanks for the tip. I learned several months ago to avoid using blur in HISE when I can, so no my project doesn't make use of them.

          I never did a deep dive into Perfetto before but I am seeing the huge advantages of it now! I am seeing that if I disable the OpenGL flag that the performance is actually improving significantly. Basically I am drawing these FFTs with a path and a timer. I am seeing OpenGL adding some extra overhead on my paint/repaint operations (almost double on average duration).

          I wish I had Ventura to test on but I am hopeful this will solve my issues!

          ustkU 1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @HISEnberg
            last edited by

            @HISEnberg Not on Ventura but Sonoma for me, and it's not just the blur, I tried a layer with a desaturate and it was just like a PANIC_MODE=1 flag was activated. Even UI buttons going ON and OFF like crazy once the plugin was loaded in DAW and similar issues in Hise itself... Go figure...

            Can't help pressing F5 in the forum...

            1 Reply Last reply Reply Quote 1
            • orangeO
              orange @aaronventure
              last edited by

              @aaronventure Does dropShadowFromPath and dropShadow also have poor performance like blur?

              develop Branch / XCode 13.1
              macOS Monterey / M1 Max

              A 1 Reply Last reply Reply Quote 0
              • A
                aaronventure @orange
                last edited by

                @orange yes.

                DropShadowFromText doesn't because it's based on the Melatonin Blur library.

                We're waiting for all the other drop shadow methods and blurs to be ported over to melatonin. It's been... a bit.

                orangeO 1 Reply Last reply Reply Quote 1
                • orangeO
                  orange @aaronventure
                  last edited by

                  @aaronventure I was about to use dropShadow on knob’s laf, good to know, thank you

                  develop Branch / XCode 13.1
                  macOS Monterey / M1 Max

                  d.healeyD A 2 Replies Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @orange
                    last edited by d.healey

                    @orange said in Ventura - UI lag:

                    I was about to use dropShadow on knob’s laf, good to know,

                    I haven't ran into any issues, I think if you're only using a few static shadows there shouldn't be a problem...

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    1 Reply Last reply Reply Quote 0
                    • A
                      aaronventure @orange
                      last edited by

                      @orange You can still do it, I use it all the time.

                      But it's inefficient for what it is - melatonin should be 10-100x performance boost.

                      If you're making like 150 calls on a panel, it'll visibly eat into the performance. I have this custom keyboard which is shaded and it's a hog.

                      5a0978d8-0cb6-4b0a-9b2e-d7c9d08fd367-image.png

                      I also use it for glows on mouse hover/click. In that case I'm adjusting the shadow color with an alpha factor, so when there's no mouse over, there's no glow. But after doing it to the entire interface, it was stupidly slow on something like an M1 Air - the fix was to add an if check to the method call which made sure it was only executing when there's a cursor over it.

                      So while by itself it's not super expensive, it's very inefficient for what it is and it piles up quickly.

                      d.healeyD orangeO 2 Replies Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @aaronventure
                        last edited by

                        @aaronventure said in Ventura - UI lag:

                        . I have this custom keyboard which is shaded and it's a hog.

                        Get Christoph to show you how he made the fancy 3D keyboard for the Dorian Marko piano ;)

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

                        A 1 Reply Last reply Reply Quote 0
                        • orangeO
                          orange @aaronventure
                          last edited by

                          @aaronventure @d-healey Except for mouse over glow, there will be 4 dropShadow s on each knob statically, and there will be 20 knobs in total. So 80 dropShadow will be drawn statically. I think this will consume a lot of CPU.

                          develop Branch / XCode 13.1
                          macOS Monterey / M1 Max

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            aaronventure @d.healey
                            last edited by

                            @d-healey That was OpenGL I think, I found his post from the first OpenGL thread.

                            I spent a few days creating a super cool dynamic background shader and then it just stopped working....

                            So no thanks, I'll wait for a proper modern, stable, consistent graphics library haha.

                            d.healeyD 1 Reply Last reply Reply Quote 0
                            • A
                              aaronventure @orange
                              last edited by aaronventure

                              @orange Well you don't have to guess, you can draw an estimate right now in LAF, call it 4 times (content doesn't matter, only size/area), create 20 knobs in a for loop and open Perfetto (or the new profiler), and you'll get concrete data.

                              You should probably add a panel beneath it all, with an image or something like that, just in case 20 knobs on an empty background ends up being something where not all of them get redrawn.

                              This way you force the redraw of the panel, and that might force a redraw of all other knobs, which is a more realistic setup in a complex UI.

                              Start the trace, and start fiddling with the knobs, then stop the trace and check it out.

                              1 Reply Last reply Reply Quote 0
                              • d.healeyD
                                d.healey @aaronventure
                                last edited by

                                @aaronventure said in Ventura - UI lag:

                                That was OpenGL I think

                                That's only half the story. OpenGL eats CPU too. In the final product it's using images, Christoph had a cool way to generate them.

                                Libre Wave - Freedom respecting instruments and effects
                                My Patreon - HISE tutorials
                                YouTube Channel - Public HISE tutorials

                                A 1 Reply Last reply Reply Quote 0
                                • A
                                  aaronventure @d.healey
                                  last edited by

                                  @d-healey Ah, I did work on a UI where the entire thing is pathtraced in blender and each component was exported individually with glows separate, then I wrote a python script to process it all using GIMP (based on metadata) and recombine the glows and shadows into pngs with proper transparency, then put it all together in HISE. Runs great and looks cool, but the memory hit is real (140mb of RAM per instance).

                                  I imagine it's a lot easier for a piano, you basically have up to 18 images per key, or something like that.

                                  d.healeyD 1 Reply Last reply Reply Quote 0
                                  • d.healeyD
                                    d.healey @aaronventure
                                    last edited by

                                    @aaronventure said in Ventura - UI lag:

                                    140mb of RAM per instance).

                                    The images should be shared across instances

                                    Libre Wave - Freedom respecting instruments and effects
                                    My Patreon - HISE tutorials
                                    YouTube Channel - Public HISE tutorials

                                    A 1 Reply Last reply Reply Quote 0
                                    • A
                                      aaronventure @d.healey
                                      last edited by

                                      @d-healey Ah that's good to know, and makes perfect sense.

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

                                      45

                                      Online

                                      1.7k

                                      Users

                                      11.7k

                                      Topics

                                      101.8k

                                      Posts