Giter Site home page Giter Site logo

Bad pen trail performance about rmview HOT 17 OPEN

bordaigorl avatar bordaigorl commented on August 28, 2024
Bad pen trail performance

from rmview.

Comments (17)

bordaigorl avatar bordaigorl commented on August 28, 2024

I need more info: Os, RM1 or RM2?
What exactly do you mean by "updates": do you mean the screen update or the pen tracking position update?
Typically the pen trail is displayed when no update of the screen is happening.
Can you describe your specific use case to reproduce the issue?

from rmview.

DanielBrosch avatar DanielBrosch commented on August 28, 2024

Windows 10, RM2

To clarify: I want to use this tool for giving presentations. So I sometimes want to hover the pen over the screen, highlighting part of some slides, without actually writing on them.

Right now if I do that the pen trail looks pretty laggy, and only updates about twice a second while moving. It actually does seem to get worse the longer you hover (after about 5-10 seconds it only updates once a second).

from rmview.

bordaigorl avatar bordaigorl commented on August 28, 2024

Ok that's strange.
Is there any combination of settings that resolves the issue?
Are you connecting via USB or WiFi?
Are you testing this while using other software that may be affecting performance?
For example: OBS, screen capturing apps, or something network heavy while connecting via Wifi.
Does the issue persist if you close all other apps?

from rmview.

bordaigorl avatar bordaigorl commented on August 28, 2024

(One thing that could help is removing line 337 from rmview.py)

from rmview.

DanielBrosch avatar DanielBrosch commented on August 28, 2024

I so far nothing I tried resolved it. I connected the tablet via USB. The problem persists even if everything else is closed.

I captured the problem: (Note that here the performance is worse by a factor of about 2-3 due to screencapturing)

PenPerformance.mp4

from rmview.

DanielBrosch avatar DanielBrosch commented on August 28, 2024

(One thing that could help is removing line 337 from rmview.py)

I already added
if self.trailDelay > 0:
there, which does make it much smoother. But then I loose out on the pen trail, of course.

Also, every time I close the program (using right click->quit), I get

Stopping framebuffer thread...
Connection lost: Connection to the other side was lost in a non-clean fashion: Connection lost.
Framebuffer thread stopped

from rmview.

bordaigorl avatar bordaigorl commented on August 28, 2024

I already added
if self.trailDelay > 0:
there, which does make it much smoother. But then I loose out on the pen trail, of course.

That does not seem right: if trailDelay is 0 then trail is None so that code should not be executed anyway.

Can you try by just removing QTimer.singleShot(self.trailDelay // 2, lambda: t.setOpacity(.5)) altogether?
It could be that the QTimer events are clogging the event queue, or that the opacity is a performance bottleneck on Windows (just guessing)

from rmview.

DanielBrosch avatar DanielBrosch commented on August 28, 2024

I already added
if self.trailDelay > 0:
there, which does make it much smoother. But then I loose out on the pen trail, of course.

That does not seem right: if trailDelay is 0 then trail is None so that code should not be executed anyway.

Oh, sorry, you are right of course, no performance difference.

Can you try by just removing QTimer.singleShot(self.trailDelay // 2, lambda: t.setOpacity(.5)) altogether?
It could be that the QTimer events are clogging the event queue, or that the opacity is a performance bottleneck on Windows (just guessing)

The performance is still bad, but may be slightly better. It seems to get worse the bigger the window is. Landscape full screen size (1080p) performance is not very usuable with pen trails. (General update rate also seems to go down a notch, but not as bad as the pen trails. Small window looks pretty much instant, full screen still fast, but visible steps.)

from rmview.

bordaigorl avatar bordaigorl commented on August 28, 2024

Oh no that sucks, I am sorry!
I am not sure what may be causing this (I cannot reproduce, but I may try later on a windows machine) could be some performance issue between Qt and the graphics card? Shooting in the dark here...which machine are you using?

from rmview.

bordaigorl avatar bordaigorl commented on August 28, 2024

One fleeble idea: add self.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate) at line 14 of viewer.py.

from rmview.

DanielBrosch avatar DanielBrosch commented on August 28, 2024

I am not sure what may be causing this (I cannot reproduce, but I may try later on a windows machine) could be some performance issue between Qt and the graphics card? Shooting in the dark here...which machine are you using?

I am currently using the Laptop Acer Aspire F5-573G. Processor: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz, 2701 Mhz, 2 Core(s), 4 Logical Processor(s), GPU NVIDIA GeForce 940MX.

I just noticed that rmview for some reason only uses the integrated GPU and not the dedicated one. Investigating now why. Could be that I set some too strong battery saving options years ago when I used this laptop more on battery....

from rmview.

DanielBrosch avatar DanielBrosch commented on August 28, 2024

Actually, it doesn't use either GPU, it seems to run CPU based. Both stay at under 2-3% while the CPU jumps to >80% when something is drawn.

One fleeble idea: add self.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate) at line 14 of viewer.py.

Also, this does not seem to change anything.

from rmview.

DanielBrosch avatar DanielBrosch commented on August 28, 2024

I tried to enforce GPU use with the NVIDIA control panel for rmview.exe (and system wide default), but it does still only use the CPU.

from rmview.

bordaigorl avatar bordaigorl commented on August 28, 2024

Are you using the windows bundle from the releases?
If so you could try and install rmview with the other method.

from rmview.

DanielBrosch avatar DanielBrosch commented on August 28, 2024

I cloned the repository and followed the pip install instructions. I just tried out the windows bundle, too, and have the same thing there: Bad pen trail performance, and no GPU use.

from rmview.

bordaigorl avatar bordaigorl commented on August 28, 2024

Thanks for testing that. One thing I would try is to see if the python executable was allowed to use the GPU.

from rmview.

DanielBrosch avatar DanielBrosch commented on August 28, 2024

I already did set it up in NVIDIA control panel for both the python and rmview executables. Is there another place to check?

from rmview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.