Bug #1497
optimize the drawing of radar by removing multiple access to local db
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.
History
#1 Updated by kervala almost 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Applied in changeset commit:63c43ca2deb4.
#2 Updated by kervala almost 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 almost 6 years ago
Thanks alot indeed!
#4 Updated by kervala almost 6 years ago
I noticed a good improvement in overall speed :)
#5 Updated by yricl almost 6 years ago
- File radar2.diff added
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