Miscellaneous improvements
Aus FunkFeuer Wiki
- TU Wien lecture "Verteilte systeme", 20.4.2007 will present our ideas about optimizing complexity. Aaron also wants to adress more students from the TU to participate. DONE. Let's see if new participants want to join.
- finalize the UML test server
- try out the optimization ideas and document the speedup
- more cleanups
- olsrd is doing lots of malloc()s and free()s - use ltrace to see this.
- review malloc()/free() if it theys are superflous and can be implemented with buffers on the stack or just moving pointers around.
- are there very frequently malloc()ed and free()d struct? Perhaps a free list can help to avoid lots of malloc()/free() handling.
- we have several coding styles in there
- add wrappers to hide type casts for Windows (and perhaps others). Reserve some prefix (e.g. x is used for this often as in xmalloc(), olsr_ is IMHO quite long and there too many olsr_ perfixed types and functions right now.)
- fixup error reporting/tracing/logging
- add synchronization and make the daemon multi-threading (e.g. the bmf plugin uses it right now, the httpinfo plugin could benefit from such a thing)
- make the parameter parsing of the plugins more consistent (some are case-sensitive, some are not, most do not check syntax errors). Work in progress
- The incoming and outgoing packets are deserialized and serialized via pointers to packed structs. This is somewhat dangerous as other compilers or the same compielr for other architectures may or may not behave the same. And - worse - it misleads people to copy the same data various times around or play with pointers so no one can easily see ehat'e going on. I (Bernd) started with a more direct approach in src/lq_packet.c where we have one "unsigned char *" which walks sequentially through the incoming packet and gets the value with small inline functions into where one needs it later on - mostly some simple struct which is a normal C struct and used by the core code.
- 'net_outbuffer_push() memcpy()es the packet from the caller supplied buffer into another buffer. Well, that's one more copy operation for every outgoinf packet.
- ....
- olsrd is doing lots of malloc()s and free()s - use ltrace to see this.