Bas Couwenberg pushed to branch bookworm-backports at Debian GIS Project / josm
Commits: fcb5dcf7 by Bas Couwenberg at 2024-09-09T18:11:50+02:00 Add upstream patch to fix copy/paste regression. - - - - - be82c415 by Bas Couwenberg at 2024-09-09T18:12:02+02:00 Set distribution to unstable. - - - - - 1ebef678 by Bas Couwenberg at 2024-09-15T06:18:45+02:00 Merge tag 'debian/0.0.svn19207+dfsg-2' into bookworm-backports releasing package josm version 0.0.svn19207+dfsg-2 - - - - - 9f0c6d06 by Bas Couwenberg at 2024-09-15T06:18:51+02:00 Rebuild for bookworm-backports. - - - - - 3 changed files: - debian/changelog - debian/patches/series - + debian/patches/svn-r19214.patch Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,15 @@ +josm (0.0.svn19207+dfsg-2~bpo12+1) bookworm-backports; urgency=medium + + * Rebuild for bookworm-backports. + + -- Bas Couwenberg <[email protected]> Sun, 15 Sep 2024 06:18:48 +0200 + +josm (0.0.svn19207+dfsg-2) unstable; urgency=medium + + * Add upstream patch to fix copy/paste regression. + + -- Bas Couwenberg <[email protected]> Mon, 09 Sep 2024 18:11:51 +0200 + josm (0.0.svn19207+dfsg-1~bpo12+1) bookworm-backports; urgency=medium * Rebuild for bookworm-backports. ===================================== debian/patches/series ===================================== @@ -4,3 +4,4 @@ 06-move_data_out_of_jar.patch 07-use_system_fonts.patch 08-use_noto_font.patch +svn-r19214.patch ===================================== debian/patches/svn-r19214.patch ===================================== @@ -0,0 +1,68 @@ +Description: Fix #23908: Significantly improve the performance of copy/paste when dealing with large amounts of data + From #23908, at least one valid workflow involves copy/pasting large amounts of + data (specifically updating boundaries). The relation for Terwolde in the + sample data had 2206 objects. This took >5 minutes to copy between layers. With + this change, it takes <1 second. + . + This is a performance regression from r19176. The primary culprit from r19176 is + when we check the size of the dataset. The problem is that we check to see if the + size of the primitives being changed is greater than or equal to the non-deleted + complete primitives in the dataset. We get a new filtered collection each time + we get those primitives, and therefore the size of that is not cached. The size + calculation for the filtered collection is where almost all the expense is. We + fix that by wrapping the work from AddPrimitivesCommand in DataSet#update to + have a single large update at the end of the copy operation. This ensures that + we do not have many spurious fired event calls when a mass operation is going on. +Author: Taylor Smock +Origin: https://josm.openstreetmap.de/changeset/19214/josm +Bug: https://josm.openstreetmap.de/ticket/23908 + +--- a/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java ++++ b/src/org/openstreetmap/josm/command/AddPrimitivesCommand.java +@@ -10,8 +10,6 @@ import java.util.Objects; + import java.util.Optional; + import java.util.stream.Collectors; + +-import javax.swing.Icon; +- + import org.openstreetmap.josm.data.osm.DataSet; + import org.openstreetmap.josm.data.osm.Node; + import org.openstreetmap.josm.data.osm.NodeData; +@@ -68,6 +66,14 @@ public class AddPrimitivesCommand extend + @Override + public boolean executeCommand() { + DataSet ds = getAffectedDataSet(); ++ ds.update(() -> this.executeRealCommand(ds)); ++ if (toSelect != null) { ++ ds.setSelected(toSelect.stream().map(ds::getPrimitiveById).collect(Collectors.toList())); ++ } ++ return true; ++ } ++ ++ private void executeRealCommand(DataSet ds) { + if (createdPrimitives == null) { // first time execution + List<OsmPrimitive> newPrimitives = new ArrayList<>(data.size()); + preExistingData = new ArrayList<>(); +@@ -109,10 +115,6 @@ public class AddPrimitivesCommand extend + } + } + } +- if (toSelect != null) { +- ds.setSelected(toSelect.stream().map(ds::getPrimitiveById).collect(Collectors.toList())); +- } +- return true; + } + + @Override public void undoCommand() { +@@ -149,11 +151,6 @@ public class AddPrimitivesCommand extend + } + + @Override +- public Icon getDescriptionIcon() { +- return null; +- } +- +- @Override + public void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, + Collection<OsmPrimitive> added) { + // Does nothing because we don't want to create OsmPrimitives. View it on GitLab: https://salsa.debian.org/debian-gis-team/josm/-/compare/2420222013870d612d9b9b5f8842066e80cf7c44...9f0c6d065f1f985f16da3fb8b99779f7ee16b60b -- View it on GitLab: https://salsa.debian.org/debian-gis-team/josm/-/compare/2420222013870d612d9b9b5f8842066e80cf7c44...9f0c6d065f1f985f16da3fb8b99779f7ee16b60b You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ Pkg-grass-devel mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel
