Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(142)

Issue 561640045: Copy alist instead of deep copy on Grob clone (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years ago by hanwenn
Modified:
3 years, 11 months ago
Reviewers:
hahnjo
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Copy alist instead of deep copy on Grob clone On the MSDM score, ly_deep_copy takes 1.58% of runtime according a grpof. Removing it shows a consistent 1.4% improvement in user time. The deep copy was introduced together with the separation of object properties and value properties. This is because the Grob substition needs did a recursive rewrite of all properties, and the equivalent for value (ie. non-object) properties is to do a deep copy. The deep copy does not really solve a problem, because the reader calling get_property cannot distinguish grob-local values from immutable, shared values. The sort of modification that a deep copy protects against would modify the shared data in this case, leading to bugs.

Patch Set 1 #

Patch Set 2 : expand description #

Patch Set 3 : description #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -2 lines) Patch
M lily/grob.cc View 1 chunk +1 line, -2 lines 0 comments Download
M lily/include/lily-guile.hh View 1 chunk +1 line, -0 lines 0 comments Download
M lily/lily-guile.cc View 1 2 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 16
hahnjo
Please give reasons for changes, ie why isn't it necessary to do a deep copy? ...
4 years ago (2020-04-13 20:44:47 UTC) #1
hanwenn
expand description
4 years ago (2020-04-13 20:58:44 UTC) #2
hanwenn
On 2020/04/13 20:44:47, hahnjo wrote: > Please give reasons for changes, ie why isn't it ...
4 years ago (2020-04-13 21:00:11 UTC) #3
hanwenn
it's hard to say if this makes a measurable difference: $ grep -C1 User.time timing-deepcopy.txt ...
4 years ago (2020-04-13 21:01:11 UTC) #4
hahnjo
On 2020/04/13 21:01:11, hanwenn wrote: > it's hard to say if this makes a measurable ...
4 years ago (2020-04-14 07:00:56 UTC) #5
hanwenn
On 2020/04/14 07:00:56, hahnjo wrote: > On 2020/04/13 21:01:11, hanwenn wrote: > > it's hard ...
4 years ago (2020-04-14 07:24:10 UTC) #6
hahnjo
On 2020/04/14 07:24:10, hanwenn wrote: > On 2020/04/14 07:00:56, hahnjo wrote: > > On 2020/04/13 ...
4 years ago (2020-04-14 07:28:09 UTC) #7
hanwenn
On Tue, Apr 14, 2020 at 9:28 AM <jonas.hahnfeld@gmail.com> wrote: > > On 2020/04/14 07:24:10, ...
4 years ago (2020-04-14 09:39:18 UTC) #8
hahnjo
On 2020/04/14 09:39:18, hanwenn wrote: > On Tue, Apr 14, 2020 at 9:28 AM <mailto:jonas.hahnfeld@gmail.com> ...
4 years ago (2020-04-14 10:22:01 UTC) #9
hanwenn
On 2020/04/14 10:22:01, hahnjo wrote: > On 2020/04/14 09:39:18, hanwenn wrote: > > On Tue, ...
4 years ago (2020-04-14 19:14:29 UTC) #10
hahnjo
On 2020/04/14 19:14:29, hanwenn wrote: > On 2020/04/14 10:22:01, hahnjo wrote: > > On 2020/04/14 ...
4 years ago (2020-04-14 20:07:17 UTC) #11
hanwenn
On 2020/04/14 20:07:17, hahnjo wrote: > On 2020/04/14 19:14:29, hanwenn wrote: > > On 2020/04/14 ...
4 years ago (2020-04-15 22:15:04 UTC) #12
hanwenn
description
4 years ago (2020-04-15 22:23:44 UTC) #13
hanwenn
On 2020/04/15 22:23:44, hanwenn wrote: > description now I remember why the deep copy was ...
4 years ago (2020-04-15 22:25:09 UTC) #14
hahnjo
On 2020/04/15 22:15:04, hanwenn wrote: > On 2020/04/14 20:07:17, hahnjo wrote: > > On 2020/04/14 ...
4 years ago (2020-04-16 08:05:18 UTC) #15
hanwenn
3 years, 11 months ago (2020-05-02 22:23:19 UTC) #16
commit a456a5946c21cb63c64640a758e7faf829d98fa2
Author: Han-Wen Nienhuys <hanwen@lilypond.org>
Date:   Mon Apr 13 20:57:51 2020 +0200

    Copy alist instead of deep copy on Grob clone
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b