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 788813 - gparted-0.30.0/include/Partition.h:137]: performance problem
gparted-0.30.0/include/Partition.h:137]: performance problem
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
0.30.0
Other Linux
: Normal normal
: ---
Assigned To: Mike Fleetwood
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2017-10-11 07:14 UTC by dcb
Modified: 2019-05-29 17:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Pass message parameters by reference to 2 Partition methods (v1) (8.29 KB, patch)
2019-03-23 11:13 UTC, Mike Fleetwood
none Details | Review

Description dcb 2017-10-11 07:14:04 UTC
gparted-0.30.0/include/Partition.h:137]: (performance) Function parameter 'msgs' should be passed by reference.

Source code is

    void append_messages( const std::vector<Glib::ustring> msgs )

More usual would be something like

    void append_messages( const std::vector<Glib::ustring> & msgs )
Comment 1 Mike Fleetwood 2019-03-23 11:13:15 UTC
Created attachment 374214 [details] [review]
Pass message parameters by reference to 2 Partition methods (v1)

Hi Curtis,

Here's patchset v1 for this.  As noted in the commit message this change
probably makes no performance difference because functions defined in
the class are inlined anyway.

As this is a pre-GitLab bug, I'm using the pre-GitLab workflow.

Thanks,
Mike
Comment 2 Curtis Gedak 2019-03-23 17:24:18 UTC
Hi Mike,

These code changes look good to me.  I tested on Kubuntu 16.04 and Fedora 29 and no regressions were found.

If no concerns are raised then I will commit these changes to the git master branch in the next day or so.

Regards,
Curtis
Comment 3 Curtis Gedak 2019-03-24 17:19:01 UTC
These code change have been committed to the git master branch for inclusion in the next release of GParted.

The relevant git commits can be viewed at the following links:

Pass message parameters by reference to 2 Partition methods (#788813) 
https://gitlab.gnome.org/GNOME/gparted/commit/454ac64d1905ade9576cd09bb9ef5555d795c619

Go back to symbolic label widget alignment constants 
https://gitlab.gnome.org/GNOME/gparted/commit/45fd146fd0f7616518caaf77918c1735ad5af5ad
Comment 4 Curtis Gedak 2019-05-29 17:06:19 UTC
This enhancement was included in the GParted 1.0.0 release on May 29, 2019.