Giter VIP home page Giter VIP logo

Comments (9)

otavio avatar otavio commented on August 13, 2024

Take a look on wait_obj. It might be what you're looking for.

from freerdp-old.

g-reno avatar g-reno commented on August 13, 2024

Just looking around for running loops in the tree:

$ grep -RHn 'while (1)' *
channels/rdpdr/smartcard/scard_operations.c:461:    while (1)
channels/rdpdr/smartcard/scard_operations.c:660:    while (1)
channels/rdpdr/rdpdr_main.c:827:    while (1)
channels/rdpdr/rdpdr_main.c:896:    while (1)
channels/rdpdr/rdpdr_scard.c:78:    while (1)
channels/rdpdbg/rdpdbg_main.c:112:  while (1)
channels/rdpdbg/rdpdbg_main.c:157:  while (1)
channels/rdpsnd/rdpsnd_main.c:203:  while (1)
channels/rdpsnd/rdpsnd_main.c:581:  while (1)
channels/rdpsnd/rdpsnd_main.c:632:  while (1)
channels/drdynvc/drdynvc_main.c:462:    while (1)
channels/drdynvc/drdynvc_main.c:508:    while (1)
channels/drdynvc/audin/alsa/audin_alsa.c:199:       while (1)
channels/cliprdr/cliprdr_x11.c:892: while (1)
channels/cliprdr/cliprdr_main.c:189:    while (1)
channels/cliprdr/cliprdr_main.c:234:    while (1)
dfb/dfbfreerdp.c:566:   while (1)
dfb/dfbfreerdp.c:743:   while (1)
libfreerdp-core/mppc.c:334:         while (1);
libfreerdp-core/mppc.c:368: while (1);
libfreerdp-gdi/gdi_32bpp.c:1086:    while (1)
libfreerdp-gdi/gdi_8bpp.c:844:  while (1)
libfreerdp-gdi/gdi_16bpp.c:1013:    while (1)
win/wfreerdp/wfreerdp.c:541:    while (1)
win/wfreerdp/wfreerdp.c:712:    while (1)
X11/xfreerdp.c:694: while (1)
X11/xfreerdp.c:872: while (1)

If these are all running continuously in the different threads they will definitely be a battery killer on any portable device.

.

from freerdp-old.

otavio avatar otavio commented on August 13, 2024

We surelly welcome patches to address those :-D

from freerdp-old.

g-reno avatar g-reno commented on August 13, 2024

I'm sure. :-)

I think this one is going to take a team effort to look at this.

The scope is pretty big and you would have to do all of it in order to accomplish the goal.

.

from freerdp-old.

g-reno avatar g-reno commented on August 13, 2024

Yep, just what I was afraid of:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                            
 9979 root      20   0  446m  20m 2920 S 21.6  0.3   0:06.60 lt-dfbfreerdp

This is just at idle with no plugins, no user activity, no server activity.

That level of idle CPU usage will kill a battery on a portable device in short order.

from freerdp-old.

otavio avatar otavio commented on August 13, 2024

Yes ... I fully agree.

Surely this is a team-work and we ought to commit to avoid this to happen again in the future however it is natural to have those issues as the project start to mature itself.

Currently I am quite busy on other stuff so I won't be at help for now. If you can start looking at it and propose patches it would be awesome.

I am sure that others can help with this issue and also help to review proposed patches to address these issues.

from freerdp-old.

g-reno avatar g-reno commented on August 13, 2024

Right now it looks like these loops are all "polling" loops.

I think what we need are "wait event" loops that wait for an event interrupt to occur before they run the next cycle.

These are the copyrights from the files uniquely sorted, so probably they should make up the team I would think.

   Copyright 2009-2011 Jay Sorg
   Copyright 2010-2011 Vic Lee
   Copyright 2010 Marc-Andre Moreau 
   Copyright 2011 Eduardo Fiss Beloni 
   Copyright 2011 O.S. Systems Software Ltda.
   Copyright (c) 2009-2011 Jay Sorg
   Copyright (c) 2010-2011 Vic Lee
   Copyright (C) Alexi Volkov  2006
   Copyright (C) Jay Sorg 2009-2011
   Copyright (C) Jay Sorg 2010-2011
   Copyright (C) Matthew Chapman 1999-2008

from freerdp-old.

otavio avatar otavio commented on August 13, 2024

Some of those do that. You can even see how it is done to try to accommodate it your the one you wish.

from freerdp-old.

g-reno avatar g-reno commented on August 13, 2024

Ok, I just reconfigured to compile X11 version.

It is showing less cpu usage than dfbfreerdp version.

So what is needed to make dfbfreerdp to behave like xfreerdp?

Maybe it is that improvements for event handling did not get migrated into the dfbfreerdp UI.

I'll try to look at this some more maybe tomorrow.

Maybe Jay or Vic could chime in here.

from freerdp-old.

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.