Code review comment for lp:~dobey/unity-scope-click/sort-az

Revision history for this message
Alejandro J. Cura (alecu) wrote :

The std::transform is happening twice for each comparison done during the sort; this looks bad cpu-wise;

One option to fix this is using a sorted map with the lowercased items as keys. Other option is moving the lowercasing to a method of Application, where we can cache it if needed.

Also, please move the sorting into its own function, and create unit tests for it.

review: Needs Fixing

« Back to merge proposal