Ticket #288 (new enhancement)

Opened 4 years ago

Last modified 4 years ago

Find a way to synchronize more timers in KMess

Reported by: diederik Owned by:
Priority: someday Milestone: open
Component: Code cleanup Version: 2.0-alpha
Keywords: Cc:

Description

There are currently quite a few timers in KMess (see code below).

To contribute our bit to Linux powersaving (see powertop), I'd like to know how many times we wake up the CPU, and how many timers (which run frequently) are candidates to combine in a single shot.

The ChatMaster::timedUpdate() is a start at this already.

./src/utils/nowlisteningclient.h:    QTimer             timer_;
./src/utils/xautolock.h:    QTimer           *timer_;
./src/network/msnsockethttp.h:    QTimer               pollingTimer_;
./src/network/msnswitchboardconnection.h:    QTimer              *keepAliveTimer_;
./src/network/extra/directconnectionbase.h:    QTimer                 connectionTimer_;
./src/network/msnsockettcp.h:    QTimer               connectionTimer_;
./src/network/msnsockettcp.h:    QTimer               pingTimer_;
./src/network/msnnotificationconnection.h:    QTimer               loginTimer_;
./src/network/applications/sipconnection.cpp:  QTimer *socketEventTimer = new QTimer(this);
./src/network/applications/sipconnection.cpp:  QTimer *socketEventTimer = new QTimer(this);
./src/network/applications/p2papplicationbase.h:    QTimer                *waitingTimer_;
./src/network/applications/applicationlist.h:    QTimer                 sbReadyWriteTester_;
./src/network/upnp/manager.h:    QTimer              *ssdpTimer_;
./src/chat/chatwindow.h:    QTimer           blinkTimer_;
./src/chat/chatwindow.h:    QTimer           statusTimer_;
./src/chat/chatview.h:    QTimer                userTypingTimer_;
./src/chat/chat.h:    QTimer             typingTimer_;
./src/chat/contactframe.h:    QTimer           typingTimer_;
./src/kmesstest.cpp:  QTimer *test = new QTimer();
./src/kmessinterface.h:    QTimer              *onlineTimer_;
./src/dialogs/transferentry.h:    QTimer  *timer_;

Change History

Changed 4 years ago by valerio

Now that I see them all grouped, I can quite easily notice that all the typing, ping, keepalive timers could be grouped together to a timer with a resolution of 5-10 seconds.

We'd save a lot of power.

The network code, once split to a library, could emit a timed signal to accomplish this unification task, but for now I guess the only viable solution could be some global variable or a signal in KMessShared, maybe.

Note: See TracTickets for help on using tickets.