After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787400 - PATCH: Speed up creating of new events
PATCH: Speed up creating of new events
Status: RESOLVED FIXED
Product: shotwell
Classification: Other
Component: events
0.27.x
Other Linux
: Normal normal
: ---
Assigned To: Shotwell Maintainers
Shotwell Maintainers
: 715584 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-07 08:58 UTC by Gert
Modified: 2017-10-07 11:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to move switching to event after the event was created and populated (1.56 KB, patch)
2017-09-07 08:58 UTC, Gert
none Details | Review
updated patch (tabs replaced by spaces) (1.57 KB, patch)
2017-10-03 20:45 UTC, Gert
committed Details | Review

Description Gert 2017-09-07 08:58:54 UTC
Created attachment 359326 [details] [review]
Patch to move switching to event after the event was created and populated

Currently when creating a new event the view switches to this new event and only then populated it. As a result the view is redrawn with each new picture inserted and this slows down the event creation considerably. 

The attached patch simply moves the "image move" operation before the switch to the new event thereby avoiding redrawing the view all the time. The result is that creating a new event from ~100 images that are not yet in an event is  almost instantaneous and does no longer take seconds.

The patch does not address this same redraw issue if the source of the images is also an event though.

For this a better approach would be to either disable redrawing completely, or temporary switch to another view (e.g. display the first currently selected images), but I haven't found out yet how to do this. 

I've tested the patch on Gentoo and it does what I hoped for. 

Best, 
Gert
Comment 1 Jens Georg 2017-10-03 18:41:37 UTC
Review of attachment 359326 [details] [review]:

Please fix the indentation to use spaces; otherwise looks good
Comment 2 Gert 2017-10-03 20:45:58 UTC
Created attachment 360876 [details] [review]
updated patch (tabs replaced by spaces)
Comment 3 Jens Georg 2017-10-07 11:02:41 UTC
*** Bug 715584 has been marked as a duplicate of this bug. ***