← Back to team overview

kicad-developers team mailing list archive

Perf HighlightConnectionAtPosition

 

Hi all,

I was just playing around and found that the highlight net tool is visibly slow. I delved into the code, and saw that finding connected NETLIST_OBJECT involves needlessly looping over NETLIST_OBJECTS.

Is there any performance consideration behind having the NETLIST_OBJECTS as a std::vector? Would it be better to have an std::unordered_map from the net codes to a std::vector of all NETLIST_OBJECT with that net code?

Rudimentary instrumentation with callgrind shows that most of the time is spent in SCH_SHEET_PATH comparisons.

-- 
Regards,
Gaurav Juvekar


Follow ups