Resolve "Performance optimization in knowledge store"
Closes #12 (closed)
Optimizations:
- Cached
get_position()
,traci
API now used once per second per vehicle - Optimized euclidean distance computation (cached dot-producted position as well)
- Fixed stupid mistake of searching through array instead through dictionary keys
- Small touches here and there (e.g. place faster computing statement in the front of an
and
operator)
Performance is quite better now, profiling results say get_position()
and euclidean distance computation are our bottlenecks,
so feel free to suggest how to compute message relevance less oftenly
Edited by boyanh