Ignore:
Timestamp:
2011-12-29T21:17:15+01:00 (12 years ago)
Author:
jttt
Message:

Speed up Prepare dataset phase when downloading multiple bboxs (for example when using Download along on gpx layer)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTaskList.java

    r3313 r4748  
    150150                        tr("Click to check whether objects in your local dataset are deleted on the server"),
    151151                        null  /* no specific help topic */
    152                 ),
    153                 new ButtonSpec(
    154                         tr("Ignore"),
    155                         ImageProvider.get("cancel"),
    156                         tr("Click to abort and to resume editing"),
    157                         null /* no specific help topic */
    158                 ),
     152                        ),
     153                        new ButtonSpec(
     154                                tr("Ignore"),
     155                                ImageProvider.get("cancel"),
     156                                tr("Click to abort and to resume editing"),
     157                                null /* no specific help topic */
     158                                ),
    159159        };
    160160
    161161        String message = "<html>"
    162             + trn("There is {0} object in your local dataset which "
    163                     + "might be deleted on the server. If you later try to delete or "
    164                     + "update this the server is likely to report a conflict.",
    165                     "There are {0} objects in your local dataset which "
    166                     + "might be deleted on the server. If you later try to delete or "
    167                     + "update them the server is likely to report a conflict.", potentiallyDeleted.size(), potentiallyDeleted.size())
    168                     + "<br>"
    169                     + trn("Click <strong>{0}</strong> to check the state of this object on the server.",
    170                             "Click <strong>{0}</strong> to check the state of these objects on the server.",
    171                             potentiallyDeleted.size(),
    172                             options[0].text) + "<br>"
    173                             + tr("Click <strong>{0}</strong> to ignore." + "</html>", options[1].text);
     162                + trn("There is {0} object in your local dataset which "
     163                        + "might be deleted on the server. If you later try to delete or "
     164                        + "update this the server is likely to report a conflict.",
     165                        "There are {0} objects in your local dataset which "
     166                                + "might be deleted on the server. If you later try to delete or "
     167                                + "update them the server is likely to report a conflict.", potentiallyDeleted.size(), potentiallyDeleted.size())
     168                                + "<br>"
     169                                + trn("Click <strong>{0}</strong> to check the state of this object on the server.",
     170                                        "Click <strong>{0}</strong> to check the state of these objects on the server.",
     171                                        potentiallyDeleted.size(),
     172                                        options[0].text) + "<br>"
     173                                        + tr("Click <strong>{0}</strong> to ignore." + "</html>", options[1].text);
    174174
    175175        int ret = HelpAwareOptionPane.showOptionDialog(
     
    182182                options[0],
    183183                ht("/Action/UpdateData#SyncPotentiallyDeletedObjects")
    184         );
     184                );
    185185        if (ret != 0 /* OK */)
    186186            return;
     
    265265                        DataSet ds = ((DownloadOsmTask) task).getDownloadedData();
    266266                        if (ds != null) {
    267                             myPrimitives.removeAll(ds.allPrimitives());
     267                            // myPrimitives.removeAll(ds.allPrimitives()) will do the same job but much slower
     268                            for (OsmPrimitive primitive: ds.allPrimitives()) {
     269                                myPrimitives.remove(primitive);
     270                            }
    268271                        }
    269272                    }
Note: See TracChangeset for help on using the changeset viewer.