hang on exit - hang time proportional to number of objects

Description

1. capture a screen area and open it in the greenshot editor
2. mark 127 rectangles in the picture (or use the counter to create 127 objects)
3. select all object
4. delete them
5. exit the application -> hangs for a long while (proportional to amount of objects created)

Environment

windows 7 64 bit

Gliffy Diagrams

Activity

Robin KromMay 24, 2016 at 11:52 AM

I finally managed to make a fix for this, but it was not easy and involved a LOT of changes to the code. In fact I had to rewrite the parts that you can select to resize / move elements in the editor (we called them grippers), and had to rewrite the logic for the undo/redo and removing the items.

This is important to mention, as with these changes a lot of errors could have been introduced.

If possible, please have a look if the latest unstable build ( 1.2.9.25 or higher) from here: https://github.com/greenshot/greenshot/releases solves your issues

Robin KromMarch 11, 2016 at 3:14 PM
Edited

I can reproduce this, and will try to make a fix for Greenshot 1.2.9, which should come in April.

For the new editor (Greenshot 2) this should never happen, but as Greenshot 1 draws everything "manually" a lot of problems can occur...

Multiple changes to the editor should be made:

  1. Undo/Redo should be made of all the object, instead of every single one of them

  2. Selecting / Deselecting / Removing / Adding of element should not need a invalidate of every single one of them, but can be made to the editors drawing surface once.

  3. There is logic which checks, while selecting an element, if the element is in a list, this causes an additional delay when the list is getting longer. There is no need to when a longer list is processed, this can be done on a different level..

Anyway, there is a lot potential for optimizing the code...

Fixed

Details

Assignee

Reporter

Affects versions

Components

Priority

Time tracking

1w 2d logged

Sprint

Created December 27, 2015 at 8:44 AM
Updated September 16, 2016 at 9:06 PM
Resolved May 24, 2016 at 11:52 AM