Commit Graph

9 Commits

Author SHA1 Message Date
Tobias Doerffel
b0822212b0 Merge branch 'remote-plugin-fixes'
* remote-plugin-fixes:
  RemotePlugin: sleep in waitForMessage() when actively waiting for data
  RemotePlugin: better code order in sendMessage() + cleanups
  RemotePlugin: coding style fixes + inline keyword reduces
  RemotePlugin: smaller buffers for number to string conversions
  RemotePlugin: added branch prediction hints
2010-07-26 15:52:14 +02:00
Tobias Doerffel
a55d71cf7f RemotePlugin: use debugMessages() instead of fprintf for error messages
Printing error messages using fprintf() does not help much with
RemotePlugins as their stdout/stderr usually is not redirected to the
parent process. Instead use the debugMessage() function.
2010-07-25 19:27:27 +02:00
Tobias Doerffel
783913e79c RemotePlugin: sleep in waitForMessage() when actively waiting for data
RemotePlugin::waitForMessage() can operate in polling mode which is used
when loading a remote plugin so the master application does not block
until the remote plugin has been loaded. This is achieved by calling
QCoreApplication::processEvents().

However if there're no events to process, the polling loop will just eat
up CPU time which is especially bad when on a single core system.
This has been fixed by inserting short sleeps.
2009-12-14 11:10:30 +01:00
Tobias Doerffel
6abba395ca RemotePlugin: better code order in sendMessage() + cleanups
We can cache the number of data sets in the message in order to avoid
duplicate data::size() calls. Furthermore the accumulation of the size
of the written data is an old relict and can be safely removed.
2009-12-14 11:05:27 +01:00
Tobias Doerffel
7b410bb52d RemotePlugin: coding style fixes + inline keyword reduces
Fixed some minor coding style issues and removed some superfluous
"inline" keywords.
2009-12-14 10:58:14 +01:00
Tobias Doerffel
ab8f2ab7c7 RemotePlugin: smaller buffers for number to string conversions
There's no need for 128 bytes when converting a number to a string.
Use 64 bytes instead.
2009-12-14 10:50:21 +01:00
Tobias Doerffel
fa9aeeb3b1 RemotePlugin: added branch prediction hints
Added some branch prediction hints, especially to ShmFifo locking
functions.
2009-12-14 10:19:14 +01:00
Tobias Doerffel
ee63a13f2d RemotePlugin: do not skip audio processing when debugging
If DEBUG_REMOTE_PLUGIN was set, RemotePlugin::process() always returned
as RemotePlugin::isRunning() returned false. Fix this by always
returning true when debugging.
2009-08-28 23:54:18 +02:00
Tobias Doerffel
8c9a9dd14c File and class renames part 1
Most files and most of the core classes and their methods have been
renamed to match new coding style conventions:

391 files changed, 25400 insertions(+), 25598 deletions(-)

Furthermore splitted some files where model and view classes were
declared or implemented together in the same file.

Should be tested thoroughly as I might have missed renaming some virtual
methods or SIGNAL/SLOT parameters.
2009-08-24 17:59:28 +02:00