Index: src/org/openstreetmap/josm/data/osm/QuadBucketPrimitiveStore.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/QuadBucketPrimitiveStore.java	(revision 17779)
+++ src/org/openstreetmap/josm/data/osm/QuadBucketPrimitiveStore.java	(working copy)
@@ -1,11 +1,8 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data.osm;
 
-import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 import java.util.function.Consumer;
-import java.util.stream.Collectors;
 
 import org.openstreetmap.josm.tools.JosmRuntimeException;
 
@@ -36,7 +33,7 @@
     /**
      * All relations/relationships
      */
-    private final Collection<R> relations = new ArrayList<>();
+    private final QuadBuckets<R> relations = new QuadBuckets<>();
 
     /**
      * Searches for nodes in the given bounding box.
@@ -80,10 +77,7 @@
      * @return List of relations in the given bbox. Can be empty but not null
      */
     public List<R> searchRelations(BBox bbox) {
-        // QuadBuckets might be useful here (don't forget to do reindexing after some of rm is changed)
-        return relations.stream()
-                .filter(r -> r.getBBox().intersects(bbox))
-                .collect(Collectors.toList());
+        return relations.search(bbox);
     }
 
     /**
