Bug #1497

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

Added by yricl almost 7 years ago. Updated almost 7 years ago.

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

100%

Category:Client: General
Target version:Version 0.9.0

Description

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

History

#1 Updated by kervala almost 7 years ago

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

Applied in changeset commit:63c43ca2deb4.

#2 Updated by kervala almost 7 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 almost 7 years ago

Thanks alot indeed!

#4 Updated by kervala almost 7 years ago

I noticed a good improvement in overall speed :)

#5 Updated by yricl almost 7 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
 2
 3#ifndef nllikely
 4#    define nllikely(expr) __builtin_expect(!!(expr), true)
 5#endif
 6#ifndef nlunlikely
 7#    define nlunlikely(expr) __builtin_expect(!!(expr), false)
 8#endif
 9
10#    else // NL_OS_UNIX
11
12#ifndef nllikely
13#    define nllikely(x) (x)
14#endif
15#ifndef nlunlikely
16#    define nlunlikely(x) (x)
17#endif
18
19#    endif // NL_OS_UNIX

Also available in: Atom PDF