Index: /trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 18793)
+++ /trunk/src/org/openstreetmap/josm/data/conflict/ConflictCollection.java	(revision 18794)
@@ -146,4 +146,7 @@
      */
     public Conflict<?> getConflictForMy(OsmPrimitive my) {
+        if (conflicts.isEmpty()) {
+            return null;
+        }
         return conflicts.stream()
                 .filter(c -> c.isMatchingMy(my))
@@ -161,4 +164,7 @@
      */
     public Conflict<?> getConflictForTheir(OsmPrimitive their) {
+        if (conflicts.isEmpty()) {
+            return null;
+        }
         return conflicts.stream()
                 .filter(c -> c.isMatchingTheir(their))
Index: /trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java	(revision 18793)
+++ /trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java	(revision 18794)
@@ -30,4 +30,6 @@
 import org.openstreetmap.josm.data.osm.history.HistoryRelation;
 import org.openstreetmap.josm.data.osm.history.HistoryWay;
+import org.openstreetmap.josm.data.preferences.BooleanProperty;
+import org.openstreetmap.josm.data.preferences.CachingProperty;
 import org.openstreetmap.josm.gui.tagging.presets.TaggingPreset;
 import org.openstreetmap.josm.gui.tagging.presets.TaggingPresetNameTemplateList;
@@ -49,4 +51,14 @@
 
     private static final List<NameFormatterHook> formatHooks = new LinkedList<>();
+    private static final CachingProperty<Boolean> PROPERTY_SHOW_ID =
+            new BooleanProperty("osm-primitives.showid", false).cached();
+    private static final CachingProperty<Boolean> PROPERTY_SHOW_ID_NEW_PRIMITIVES =
+            new BooleanProperty("osm-primitives.showid.new-primitives", false).cached();
+    private static final CachingProperty<Boolean> PROPERTY_SHOW_VERSION =
+            new BooleanProperty("osm-primitives.showversion", false).cached();
+    private static final CachingProperty<Boolean> PROPERTY_SHOW_COOR =
+            new BooleanProperty("osm-primitives.showcoor", false).cached();
+    private static final CachingProperty<Boolean> PROPERTY_LOCALIZE_NAME =
+            new BooleanProperty("osm-primitives.localize-name", true).cached();
 
     private static final List<String> HIGHWAY_RAILWAY_WATERWAY_LANDUSE_BUILDING = Arrays.asList(
@@ -143,13 +155,13 @@
     protected void decorateNameWithId(StringBuilder name, IPrimitive primitive) {
         int version = primitive.getVersion();
-        if (Config.getPref().getBoolean("osm-primitives.showid")) {
-            long id = Config.getPref().getBoolean("osm-primitives.showid.new-primitives") ?
+        if (Boolean.TRUE.equals(PROPERTY_SHOW_ID.get())) {
+            long id = Boolean.TRUE.equals(PROPERTY_SHOW_ID_NEW_PRIMITIVES.get()) ?
                     primitive.getUniqueId() : primitive.getId();
-            if (Config.getPref().getBoolean("osm-primitives.showversion") && version > 0) {
+            if (version > 0 && Boolean.TRUE.equals(PROPERTY_SHOW_VERSION.get())) {
                 name.append(tr(" [id: {0}, v{1}]", id, version));
             } else {
                 name.append(tr(" [id: {0}]", id));
             }
-        } else if (Config.getPref().getBoolean("osm-primitives.showversion")) {
+        } else if (Boolean.TRUE.equals(PROPERTY_SHOW_VERSION.get())) {
             name.append(tr(" [v{0}]", version));
         }
@@ -188,5 +200,5 @@
                 preset.nameTemplate.appendText(name, (TemplateEngineDataProvider) node);
             }
-            if (node.isLatLonKnown() && Config.getPref().getBoolean("osm-primitives.showcoor")) {
+            if (node.isLatLonKnown() && Boolean.TRUE.equals(PROPERTY_SHOW_COOR.get())) {
                 name.append(" \u200E(");
                 name.append(CoordinateFormatManager.getDefaultFormat().toString(node, ", "));
@@ -197,8 +209,12 @@
 
         String result = name.toString();
-        return formatHooks.stream().map(hook -> hook.checkFormat(node, result))
-                .filter(Objects::nonNull)
-                .findFirst().orElse(result);
-
+        // This avoids memallocs from Stream map, filter and Optional creation.
+        for (NameFormatterHook hook : formatHooks) {
+            final String checkFormat = hook.checkFormat(node, result);
+            if (checkFormat != null) {
+                return checkFormat;
+            }
+        }
+        return result;
     }
 
@@ -275,5 +291,5 @@
 
     private static String formatLocalName(IPrimitive osm) {
-        if (Config.getPref().getBoolean("osm-primitives.localize-name", true)) {
+        if (Boolean.TRUE.equals(PROPERTY_LOCALIZE_NAME.get())) {
             return osm.getLocalName();
         } else {
@@ -283,5 +299,5 @@
 
     private static String formatLocalName(HistoryOsmPrimitive osm) {
-        if (Config.getPref().getBoolean("osm-primitives.localize-name", true)) {
+        if (Boolean.TRUE.equals(PROPERTY_LOCALIZE_NAME.get())) {
             return osm.getLocalName();
         } else {
@@ -530,5 +546,5 @@
      */
     protected void decorateNameWithId(StringBuilder name, HistoryOsmPrimitive primitive) {
-        if (Config.getPref().getBoolean("osm-primitives.showid")) {
+        if (Boolean.TRUE.equals(PROPERTY_SHOW_ID.get())) {
             name.append(tr(" [id: {0}]", primitive.getId()));
         }
Index: /trunk/src/org/openstreetmap/josm/data/osm/Way.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 18793)
+++ /trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 18794)
@@ -635,5 +635,15 @@
      */
     public boolean hasOnlyLocatableNodes() {
-        return Arrays.stream(nodes).allMatch(Node::isLatLonKnown);
+        // This is used in various places, some of which are on the UI thread.
+        // If this is called many times, the memory allocations can become prohibitive, if
+        // we use Java streams.
+        // This can be easily tested by loading a large amount of ways into JOSM, and then
+        // selecting everything.
+        for (Node node : nodes) {
+            if (!node.isLatLonKnown()) {
+                return false;
+            }
+        }
+        return true;
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/PrimitiveRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/PrimitiveRenderer.java	(revision 18793)
+++ /trunk/src/org/openstreetmap/josm/gui/PrimitiveRenderer.java	(revision 18794)
@@ -48,5 +48,6 @@
     public Component getListCellRendererComponent(JList<? extends IPrimitive> list, IPrimitive value, int index,
             boolean isSelected, boolean cellHasFocus) {
-        Component def = defaultListCellRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
+        // Use an empty string for the value to avoid expensive Object.toString calls, which will happen again in renderer.
+        Component def = defaultListCellRenderer.getListCellRendererComponent(list, "", index, isSelected, cellHasFocus);
         return renderer(def, value, list.getModel().getSize() > 1000);
     }
