Bug #1497

optimize the drawing of radar by removing multiple access to local db

Added by yricl over 6 years ago. Updated over 6 years ago.

Status:Resolved Start date:09/29/2012
Priority:Normal Due date:
Assignee:kervala % Done:


Category:Client: General
Target version:Version 0.9.0


using dB observer reduce the time passed in radar drawing function.

This improves a least a factor of 2 the time spent in the function.

radar.diff - view_radar.h & view_radar.cpp diff (12.6 kB) Magnifier yricl, 09/29/2012 01:54 pm

radar2.diff - little more optimization (1.9 kB) Magnifier yricl, 10/02/2012 12:33 am


#1 Updated by kervala over 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset commit:63c43ca2deb4.

#2 Updated by kervala over 6 years ago

  • Assignee set to kervala
  • Target version set to Version 0.9.0

Thanks a lot for your patch! It'll be useful for everyone :)

#3 Updated by arc over 6 years ago

Thanks alot indeed!

#4 Updated by kervala over 6 years ago

I noticed a good improvement in overall speed :)

#5 Updated by yricl over 6 years ago

introducing the predictible branchement optimization MACRO nllikely and nlunlikely (working only on linux with gcc, must be tested on over systems)

 1#    ifdef NL_OS_UNIX
 3#ifndef nllikely
 4#    define nllikely(expr) __builtin_expect(!!(expr), true)
 6#ifndef nlunlikely
 7#    define nlunlikely(expr) __builtin_expect(!!(expr), false)
10#    else // NL_OS_UNIX
12#ifndef nllikely
13#    define nllikely(x) (x)
15#ifndef nlunlikely
16#    define nlunlikely(x) (x)
19#    endif // NL_OS_UNIX

Also available in: Atom PDF