kicad/gerbview
Seth Hillbrand 8506cdf3ae Avoid numerical dereference of selections
The SELECTION is a std::set.  Numerical dereference of item n is O(n) as
the iterator is not random access.  Therefore, a for loop using
numerical dereference is O(n!) and quickly slows.

We avoid this by storing items to remove separately while iterating and
then removing the items after we complete.

Fixes: lp:1692081
* https://bugs.launchpad.net/kicad/+bug/1692081
2018-05-22 16:37:45 -07:00
..
dialogs Standardize print scale label for gerbview 2018-04-23 13:14:06 -07:00
gerber_test_files Add a gerber test file 2017-10-23 09:20:10 +02:00
tools Avoid numerical dereference of selections 2018-05-22 16:37:45 -07:00
CMakeLists.txt Add support for .gbrjob new file format (JSON format) in Gerbview 2018-03-19 15:14:20 +01:00
DCodeSelectionbox.cpp Fix code after renaming files 2018-01-29 16:40:22 +01:00
DCodeSelectionbox.h Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
Info.plist Changed the bundle identifier to org.kicad-pcb.<app> to follow the kicad domain name 2015-10-30 08:43:04 +13:00
X2_gerber_attributes.cpp Gerbview: minor code cleanup 2018-05-14 09:05:11 +02:00
X2_gerber_attributes.h Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
am_param.cpp Fix issue in aperture macro with some strange gerber files. 2018-03-14 14:55:51 +01:00
am_param.h Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
am_primitive.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
am_primitive.h Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
block.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
clear_gbr_drawlayers.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
controle.cpp hotkey management: enhancements in code to know if a hotkey was handled by an event or not. 2017-10-06 09:23:13 +02:00
dcode.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
dcode.h GerbView GAL support part 1: changes to existing files 2017-09-25 13:35:01 +02:00
draw_gerber_screen.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
evaluate.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
events_called_functions.cpp Fix incorrect UI management of Zoom to Selection, created by fix 2a419156 2018-04-14 17:44:17 +02:00
excellon_image.h commit forgotten change in my previous commit 2018-03-31 18:46:29 +02:00
excellon_read_drill_file.cpp Gerbview: minor code cleanup 2018-05-14 09:05:11 +02:00
export_to_pcbnew.cpp Gerbview, export to pcbnew : export polygons as new DRAWSEGMENT polygonal shape. 2018-03-31 18:43:12 +02:00
files.cpp fix misspelled 'an other' -> 'another' 2018-04-08 13:24:37 -04:00
gbr_display_options.h Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
gbr_layer_box_selector.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
gbr_layer_box_selector.h fix code after file renaming 2018-01-31 09:24:02 +01:00
gbr_layout.cpp GerbView: Fix active layer synchronization 2018-03-03 23:43:16 -05:00
gbr_layout.h fix code after file renaming 2018-01-31 09:24:02 +01:00
gbr_screen.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
gbr_screen.h Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
gerber_collectors.cpp GerbView GAL support part 2: New files for GAL 2017-09-25 13:35:01 +02:00
gerber_collectors.h rename class_collector.h to collector.h 2018-02-04 10:49:37 +01:00
gerber_draw_item.cpp Gerbview: cosmetic enhancement: add icons in Clarify menu. 2018-05-17 10:24:09 +02:00
gerber_draw_item.h Gerbview: cosmetic enhancement: add icons in Clarify menu. 2018-05-17 10:24:09 +02:00
gerber_file_image.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
gerber_file_image.h Gerbview: minor code cleanup 2018-05-14 09:05:11 +02:00
gerber_file_image_list.cpp GerbView: Implement in-place GAL layer reordering (for X2 sorting) 2018-02-27 20:59:07 +01:00
gerber_file_image_list.h GerbView: Implement in-place GAL layer reordering (for X2 sorting) 2018-02-27 20:59:07 +01:00
gerbview.cpp Fp editor and board editor have now a separate color setup. 2017-09-11 18:51:48 +02:00
gerbview.h Gerbview: bigger line buffer to read some gerber files that have only one (very long) line. 2018-03-14 10:42:18 +01:00
gerbview.icns Update MacOS icons 2018-03-22 11:45:42 -04:00
gerbview.rc Remove old xpm icons files 2012-04-07 13:09:57 +02:00
gerbview_config.cpp GerbView GAL support part 1: changes to existing files 2017-09-25 13:35:01 +02:00
gerbview_doc.icns Update MacOS icons 2018-03-22 11:45:42 -04:00
gerbview_draw_panel_gal.cpp GerbView: Fix active layer synchronization 2018-03-03 23:43:16 -05:00
gerbview_draw_panel_gal.h GerbView GAL support part 2: New files for GAL 2017-09-25 13:35:01 +02:00
gerbview_frame.cpp Make polar coordinates consistent. 2018-05-18 12:22:14 +01:00
gerbview_frame.h fix misspelled 'an other' -> 'another' 2018-04-08 13:24:37 -04:00
gerbview_id.h GerbView: add view menu. 2018-03-13 18:00:15 -04:00
gerbview_layer_widget.cpp Only adjust LAYER_WIDGET font size if larger than indicator. 2018-05-02 21:49:57 +01:00
gerbview_layer_widget.h Only adjust LAYER_WIDGET font size if larger than indicator. 2018-05-02 21:49:57 +01:00
gerbview_painter.cpp Add checks against missing D-Codes in flashed Gerber items 2018-03-18 21:55:27 -04:00
gerbview_painter.h Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
hotkeys.cpp Use Ctrl+F1 to display hotkey list also in Gerbview and Kicad manager 2018-04-14 17:12:28 +02:00
hotkeys.h GerbView GAL support part 1: changes to existing files 2017-09-25 13:35:01 +02:00
job_file_reader.cpp Optionally sort reporter messages 2018-05-22 13:55:02 -07:00
json11.cpp Add support for .gbrjob new file format (JSON format) in Gerbview 2018-03-19 15:14:20 +01:00
json11.hpp Add support for .gbrjob new file format (JSON format) in Gerbview 2018-03-19 15:14:20 +01:00
locate.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
menubar.cpp Use Ctrl+F1 to display hotkey list also in Gerbview and Kicad manager 2018-04-14 17:12:28 +02:00
onleftclick.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
onrightclick.cpp Use "..." uniformly in menus. 2018-02-10 17:32:28 -05:00
printout_control.cpp Fix code after renaming files 2018-01-29 16:40:22 +01:00
readgerb.cpp Gerbview: accept any structured comment as X2 attribute. 2018-05-14 09:05:09 +02:00
rs274_read_XY_and_IJ_coordinates.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
rs274d.cpp Gerbview: minor code cleanup 2018-05-14 09:05:11 +02:00
rs274x.cpp Gerbview: minor code cleanup 2018-05-14 09:05:11 +02:00
select_layers_to_pcb.cpp Gerbview: fix code after renaming files 2018-01-29 13:26:58 +01:00
select_layers_to_pcb.h * Gerbview: update a old code in a dialog. 2018-01-05 11:45:50 +01:00
toolbars_gerber.cpp Gerbview: fix typo in tooltip string. 2018-03-16 09:41:53 -04:00