HISE Logo Forum
    • Categories
    • Register
    • Login

    CPU stays up eventhough panel gets painted only once

    Scheduled Pinned Locked Moved Scripting
    7 Posts 2 Posters 77 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.
    • A
      Aueh
      last edited by Aueh

      I got two panels on top of each other. Panel1 is on top of Panel2, they have the same dimensions and location. Panel1 gets repainted every 100 ms, and panel2 (supposedly gets only painted once). With commenting-out Panel2.setPaintroutine Hise uses 1-2% cpu according to taskmanager. However when enable Panel2.setPaintroutine the cpu stays at 8-9% cpu usage.
      In the docs it says about the paint routine:
      "The autocomplete popup should create this function stup automatically. Whenever the Panel needs to be redrawn - which is at compilation and if you call Panel.repaint()"
      The question is, if i only draw panel2 once, which is at compilation time, why does the cpu stay up at 8-9%?

      HiseSnippet 1521.3ocsW03aZaDE2NIdp3sJsJs+.rhzjLILpM4yJ1GIgjrk1lDzHKpSQQUG1GvsXtyx9nojpn0+j2+Aau2c1fI.sqrUDB7cuu9893d9cMSDAzzTQhgo8ECioFlekUqgbYuF8HLtwIGZX9Hqmu+w623EFGLLljlRCMLMW9mQplkVwP84u9oCHQDd.c7VFFWJXAzWx5yji2s4dufEEcLIjdAqeAt2buSBD7FhHw..IKa4YDSBtgzkdFAYaIKiegj1yvbMqmsse3NgOyais2n1y1sVvlAa3uk210psiePG+M72MfRqsytsML+hiBYRQRKIQRSMLW4.Q3vV8D2x0F3RVJqcDEW3azBrrd6iEQgnKh6ZznGKJrYdHJ0.zRywArk0Aruw5TVHaz9iCbeshfyXIJF.MWZR3s7DvyuH77J.uY.IyBPZEMjdhUqfDVrbLEDOeo0IbIMoCAxSEghlWik9yRVMD.GbY09janGm.KFIg61ddUbfeJW21FxUoRm2PRbhc9Amqtttc7UdWCOlKePBEbqlDYO2xHQ+4SrfxZR3zH+Bb1kJaH5GK3vB2U0jWEj4AhT6CKRsIEQBb66Ubm1hA7vTzS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gzzajhXXh7QCYACZKUTeb9PmXpvfEh2bPWhZ71wS5y1a33EmrmpywnMdOYudTV2diuwv6uZOiOAS4+ezTSOJMLDuHbPDQN4j838exH.o1IFmFGYlmxjCKd+n+2F2+eKDehUSlLn2rw3Ry.iPAvmCLlcIoGacTmNv49w.bEqie0mmaDYn6D1EdyUBCpGrNaP+VPGr.JXcNTkfGsLWBODnW6gqwHPK30IpE+M7IinOt1LineNQi9jfDwqCzGnwqg8H0N.l3pqrVx5Tbsiug5Pdw3be3VguNHXRUMkf0VTA2XQEbyEUvsVTA2dQEbmEUvc+3BhWZe+ARQe8wFCiSadjpCoo4QbBTAppVM9GfqJJOH
      

      Edit:
      I just found out: when i drag panel 2 out of the way so that panel1 and panel2 dont overlap anymore the cpu goes down to 1-2%, but when i drag them back to original place, the cpu goes up again. Why does this happen?

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

        @Aueh Panels are repainted each time the screen is redrawn. If you have a panel with transparency over another panel then when it's repainted it will cause whatever is underneath to be redrawn.

        You can enable the opaque option for the top panel if you don't need transparency - it might help.

        Why are you repainting every 100ms?

        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
          Aueh @d.healey
          last edited by Aueh

          @d-healey
          Aha ok i see. I put two panels on top of each other because i have a dropshadow that is stationary and only needs to be painted once. If i have two panels, one with the moving parts that does need repainting and one panel that contain the stationary parts, i thought it would reduce cpu load. But as you explain it does not help. The dropshadow is especially cpu heavy so that was extra incentive to find a workaround. Is there some kind of workaround to only repaint certain parts of a panel?
          Im repainting every 100 ms because if its any less frequent it doesnt look smooth anymore. I'd like to script the animations because then its easy to connect plugin parameters with the animations, is this not the best way computationwise?

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

            @Aueh What are you animating, is it a peak meter or something?

            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
              Aueh @d.healey
              last edited by

              @d-healey Im planning to visualise the dsp diagrams of my effect with the signal and loops being animated so you can see which way the signal flows. And i want to connect my parameters to the diagram so you can see how the change of each parameter changes the signal flow.

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

                @Aueh What about if you use an image component for the shadow, perhaps that will work.

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

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

                  @d-healey Thank you, i will try that

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

                  12

                  Online

                  1.7k

                  Users

                  11.8k

                  Topics

                  103.1k

                  Posts