Skip to content

block cache: don't keep global tag index blocks - #253

Open
cldellow wants to merge 1 commit into
block-cachefrom
block-cache-skip-global-tags
Open

cldellow wants to merge 1 commit into
block-cachefrom
block-cache-skip-global-tags

Conversation

@cldellow

Copy link
Copy Markdown
Owner

Stacked on #167 (block-cache): it narrows the files that PR's cache keeps. The tables compare against #167's branch.

Fixes #252.

Change

  • Nonsynced_Transaction::data_index (template_db/transaction.h) no longer attaches the block cache to data files whose name ends in _tags_global.

One file, 9 lines added, 1 removed. No change to the database format, the query API or the results.

Impact

Mostly memory. US northeast full-history extract (Geofabrik), warm cache, 4-core VM. Builds alternate; peak RSS and median user+sys CPU of 3 runs. Base is #167's branch (47de27f). The queries: the 1° × 1° maxheight query from #242 in three boxes and their 0.99999° versions, and the 20 heaviest query templates on the public servers in June 2026, moved to Boston and New England coordinates (p01–p20).

Query peak, #167 peak, this PR change CPU, #167 CPU, this PR
dense_099 738 MB 738 MB +0% 6.56 s 6.20 s
dense_1 142 MB 142 MB +0% 1.51 s 1.51 s
empty_099 11 MB 11 MB +2% 0.00 s 0.00 s
empty_1 74 MB 13 MB -82% 0.36 s 0.33 s
p01 142 MB 142 MB +0% 1.50 s 1.49 s
p02 126 MB 72 MB -43% 1.07 s 0.95 s
p03 20 MB 21 MB +1% 2.48 s 2.41 s
p04 374 MB 374 MB +0% 6.14 s 6.41 s
p05 11 MB 12 MB +2% 0.61 s 0.64 s
p06 70 MB 63 MB -10% 0.37 s 0.40 s
p07 34 MB 34 MB +0% 5.52 s 5.60 s
p08 11 MB 10 MB -9% 0.01 s 0.01 s
p09 97 MB 97 MB +0% 2.86 s 2.85 s
p10 165 MB 165 MB +0% 3.30 s 3.13 s
p11 144 MB 144 MB +0% 3.89 s 4.02 s
p12 142 MB 130 MB -8% 1.14 s 1.17 s
p13 23 MB 24 MB +1% 0.18 s 0.17 s
p14 13 MB 13 MB +1% 1.53 s 1.67 s
p15 50 MB 50 MB +0% 0.44 s 0.41 s
p16 206 MB 206 MB +0% 9.40 s 9.07 s
p17 72 MB 59 MB -17% 0.50 s 0.48 s
p18 20 MB 20 MB +0% 10.77 s 10.89 s
p19 145 MB 145 MB +0% 7.01 s 6.82 s
p20 68 MB 13 MB -81% 0.78 s 0.67 s
sparse_099 165 MB 165 MB +0% 0.77 s 0.74 s
sparse_1 106 MB 45 MB -57% 0.45 s 0.38 s
CPU total 69.2 s 68.4 s (-1.1%)

Peak memory falls where a union looks tags up in the global index: the empty and sparse boxes, p02, p17, p20. CPU moves within noise overall. On all-changes with #243 and #247, where the copies are a larger share, instruction counts fall 3.0% for dense_1 and 3.6% for p02, and no query's count rises.

Queries

dense_1:

[out:json][timeout:90]; (way["maxheight"]["highway"](42.0,-72.0,43.0,-71.0); way["bridge"]["maxheight"](42.0,-72.0,43.0,-71.0); way["tunnel"]["maxheight"](42.0,-72.0,43.0,-71.0); node["maxheight"]["highway"](42.0,-72.0,43.0,-71.0); ); out center;

sparse_1:

[out:json][timeout:90]; (way["maxheight"]["highway"](41.0,-70.5,42.0,-69.5); way["bridge"]["maxheight"](41.0,-70.5,42.0,-69.5); way["tunnel"]["maxheight"](41.0,-70.5,42.0,-69.5); node["maxheight"]["highway"](41.0,-70.5,42.0,-69.5); ); out center;

empty_1:

[out:json][timeout:90]; (way["maxheight"]["highway"](39.0,-70.0,40.0,-69.0); way["bridge"]["maxheight"](39.0,-70.0,40.0,-69.0); way["tunnel"]["maxheight"](39.0,-70.0,40.0,-69.0); node["maxheight"]["highway"](39.0,-70.0,40.0,-69.0); ); out center;

The 0.99999° versions shrink each box's north and east edges by 0.00001°. p01 is dense_1.

p01 (maxheight bbox1deg)

[out:json][timeout:90]; (way["maxheight"]["highway"](42.0,-72.0,43.0,-71.0); way["bridge"]["maxheight"](42.0,-72.0,43.0,-71.0); way["tunnel"]["maxheight"](42.0,-72.0,43.0,-71.0); node["maxheight"]["highway"](42.0,-72.0,43.0,-71.0); ); out center;

p02 (amenities around union)

[out:json][timeout:30]; (node["amenity"="school"](around:3000,42.3601,-71.0589); way["amenity"="school"](around:3000,42.3601,-71.0589); node["amenity"="kindergarten"](around:3000,42.3601,-71.0589); way["amenity"="kindergarten"](around:3000,42.3601,-71.0589); node["amenity"="hospital"](around:5000,42.3601,-71.0589); node["amenity"="clinic"](around:5000,42.3601,-71.0589); way["amenity"="hospital"](around:5000,42.3601,-71.0589); node["amenity"="pharmacy"](around:3000,42.3601,-71.0589); node["shop"~"supermarket|convenience|mall"](around:2000,42.3601,-71.0589); way["shop"~"supermarket|convenience|mall"](around:2000,42.3601,-71.0589); node["highway"="bus_stop"](around:1500,42.3601,-71.0589); node["public_transport"="stop_position"](around:1500,42.3601,-71.0589); node["railway"="station"](around:5000,42.3601,-71.0589); node["railway"="halt"](around:5000,42.3601,-71.0589); way["natural"="water"](around:3000,42.3601,-71.0589); relation["natural"="water"](around:3000,42.3601,-71.0589); way["landuse"="forest"](around:3000,42.3601,-71.0589); relation["landuse"="forest"](around:3000,42.3601,-71.0589); way["leisure"="park"](around:2000,42.3601,-71.0589); way["highway"~"primary|secondary|tertiary"](around:2000,42.3601,-71.0589); way["highway"~"residential|unclassified|service"](around:500,42.3601,-71.0589); way["railway"~"rail|narrow_gauge"](around:1000,42.3601,-71.0589); way["landuse"="industrial"](around:3000,42.3601,-71.0589); node["landuse"="landfill"](around:5000,42.3601,-71.0589); way["landuse"="landfill"](around:5000,42.3601,-71.0589); node["amenity"="post_office"](around:3000,42.3601,-71.0589); node["amenity"="fuel"](around:3000,42.3601,-71.0589); ); out center body;

p03 (admin in area)

[out:json][timeout:30]; area(3600061315)->.country; (way["boundary"="administrative"]["admin_level"="8"](area.country); relation["boundary"="administrative"]["admin_level"="8"](area.country); ); out geom;

p04 (brands bbox ci)

[out:json][timeout:25]; (node["amenity"~"fuel|truck_stop"]["brand"~"travelcenters of america|petro stopping center|love's travel stop|ta travelcenters|pilot flying j|sapp brothers|pilot travel|seven eleven|road ranger|sapp bros|race trac|flying j|ta petro|buc-ee's|racetrac|speedway|circle k|7-eleven|7 eleven|flyingj|buc ees|am best|circlek|7eleven|love's|bucees|ambest|ambest|loves|pilot|petro|7-11|7 11|wawa|ta",i](42.16,-71.26,42.56,-70.86); node["amenity"~"fuel|truck_stop"]["name"~"travelcenters of america|petro stopping center|love's travel stop|ta travelcenters|pilot flying j|sapp brothers|pilot travel|seven eleven|road ranger|sapp bros|race trac|flying j|ta petro|buc-ee's|racetrac|speedway|circle k|7-eleven|7 eleven|flyingj|buc ees|am best|circlek|7eleven|love's|bucees|ambest|ambest|loves|pilot|petro|7-11|7 11|wawa|ta",i](42.16,-71.26,42.56,-70.86); way["amenity"~"fuel|truck_stop"]["brand"~"travelcenters of america|petro stopping center|love's travel stop|ta travelcenters|pilot flying j|sapp brothers|pilot travel|seven eleven|road ranger|sapp bros|race trac|flying j|ta petro|buc-ee's|racetrac|speedway|circle k|7-eleven|7 eleven|flyingj|buc ees|am best|circlek|7eleven|love's|bucees|ambest|ambest|loves|pilot|petro|7-11|7 11|wawa|ta",i](42.16,-71.26,42.56,-70.86); way["amenity"~"fuel|truck_stop"]["name"~"travelcenters of america|petro stopping center|love's travel stop|ta travelcenters|pilot flying j|sapp brothers|pilot travel|seven eleven|road ranger|sapp bros|race trac|flying j|ta petro|buc-ee's|racetrac|speedway|circle k|7-eleven|7 eleven|flyingj|buc ees|am best|circlek|7eleven|love's|bucees|ambest|ambest|loves|pilot|petro|7-11|7 11|wawa|ta",i](42.16,-71.26,42.56,-70.86); node["shop"~"convenience|supermarket"]["brand"~"travelcenters of america|petro stopping center|love's travel stop|ta travelcenters|pilot flying j|sapp brothers|pilot travel|seven eleven|road ranger|sapp bros|race trac|flying j|ta petro|buc-ee's|racetrac|speedway|circle k|7-eleven|7 eleven|flyingj|buc ees|am best|circlek|7eleven|love's|bucees|ambest|ambest|loves|pilot|petro|7-11|7 11|wawa|ta",i](42.16,-71.26,42.56,-70.86); node["shop"~"convenience|supermarket"]["name"~"travelcenters of america|petro stopping center|love's travel stop|ta travelcenters|pilot flying j|sapp brothers|pilot travel|seven eleven|road ranger|sapp bros|race trac|flying j|ta petro|buc-ee's|racetrac|speedway|circle k|7-eleven|7 eleven|flyingj|buc ees|am best|circlek|7eleven|love's|bucees|ambest|ambest|loves|pilot|petro|7-11|7 11|wawa|ta",i](42.16,-71.26,42.56,-70.86); node["leisure"~"fitness_centre|sports_centre"]["brand"~"planet fitness|planet-fitness|crunch fitness|crunch-fitness|planetfitness|crunch gym",i](42.16,-71.26,42.56,-70.86); node["leisure"~"fitness_centre|sports_centre"]["name"~"planet fitness|planet-fitness|crunch fitness|crunch-fitness|planetfitness|crunch gym",i](42.16,-71.26,42.56,-70.86); way["leisure"~"fitness_centre|sports_centre"]["brand"~"planet fitness|planet-fitness|crunch fitness|crunch-fitness|planetfitness|crunch gym",i](42.16,-71.26,42.56,-70.86); way["leisure"~"fitness_centre|sports_centre"]["name"~"planet fitness|planet-fitness|crunch fitness|crunch-fitness|planetfitness|crunch gym",i](42.16,-71.26,42.56,-70.86); node["amenity"="gym"]["brand"~"planet fitness|planet-fitness|crunch fitness|crunch-fitness|planetfitness|crunch gym",i](42.16,-71.26,42.56,-70.86); node["amenity"="gym"]["name"~"planet fitness|planet-fitness|crunch fitness|crunch-fitness|planetfitness|crunch gym",i](42.16,-71.26,42.56,-70.86); way["amenity"="gym"]["name"~"planet fitness|planet-fitness|crunch fitness|crunch-fitness|planetfitness|crunch gym",i](42.16,-71.26,42.56,-70.86); ); out center tags;

p05 (global data center)

[out:json][timeout:300]; (node["telecom"="data_center"]; way["telecom"="data_center"]; ); out center tags;

p06 (food around regex)

[out:json][timeout:40]; (node["amenity"~"restaurant|cafe|ramen|sushi|izakaya|fast_food|bar|pub|food_court"](around:500,42.3601,-71.0589); way["amenity"~"restaurant|cafe|ramen|sushi|izakaya|fast_food|bar|pub|food_court"](around:500,42.3601,-71.0589); node["amenity"~"school|university|college|kindergarten"](around:1000,42.3601,-71.0589); way["amenity"~"school|university|college|kindergarten"](around:1000,42.3601,-71.0589); node["amenity"~"hospital|clinic|doctors|pharmacy"](around:5000,42.3601,-71.0589); way["amenity"~"hospital|clinic|doctors|pharmacy"](around:5000,42.3601,-71.0589); node["railway"~"station|halt"](around:1000,42.3601,-71.0589); way["railway"~"station|halt"](around:1000,42.3601,-71.0589); node["highway"="bus_stop"](around:1000,42.3601,-71.0589); node["amenity"="parking"](around:500,42.3601,-71.0589); way["amenity"="parking"](around:500,42.3601,-71.0589); node["shop"="convenience"](around:500,42.3601,-71.0589); way["shop"="convenience"](around:500,42.3601,-71.0589); node["tourism"~"hotel|motel|hostel|guest_house|ryokan"](around:2000,42.3601,-71.0589); way["tourism"~"hotel|motel|hostel|guest_house|ryokan"](around:2000,42.3601,-71.0589); ); out center;

p07 (global seamark recurse)

(rel['seamark:type']; >; way['seamark:type']; >; node['seamark:type']; ); out meta;

p08 (global cameras)

[out:json][timeout:30]; (node["camera:type"="traffic_monitoring"]["camera:url"]; node["camera:type"="traffic_monitoring"]["camera:image"]; node["camera:type"="traffic_monitoring"]["image"]; node["camera:type"="traffic_monitoring"]["url"]; node["surveillance:type"="traffic_monitoring"]["camera:url"]; node["surveillance:type"="traffic_monitoring"]["camera:image"]; node["surveillance:type"="traffic_monitoring"]["image"]; node["surveillance:type"="traffic_monitoring"]["url"]; node["man_made"="surveillance"]["camera:type"="traffic_monitoring"]["camera:url"]; node["man_made"="surveillance"]["camera:type"="traffic_monitoring"]["camera:image"]; node["man_made"="surveillance"]["camera:type"="traffic_monitoring"]["image"]; node["man_made"="surveillance"]["camera:type"="traffic_monitoring"]["url"]; ); out body;

p09 (3d buildings bbox)

[out:json][timeout:360][bbox:42.34,-71.08,42.38,-71.04]; (nwr["building"]; nwr["building:part"]; relation["type"="building"]; nwr["highway"]; nwr["landuse"]["landuse"!="salt_pond"]; nwr["natural"]["natural"!="coastline"]["natural"!="bay"]["natural"!="strait"]; nwr["leisure"]; nwr["water"]["water"!="bay"]["water"!="ocean"]["water"!="sea"]["tidal"!="yes"]; nwr["waterway"]["waterway"!="tidal_channel"]; nwr["amenity"]; nwr["tourism"]; nwr["bridge"]; nwr["railway"]; nwr["roller_coaster"]; nwr["barrier"]; nwr["entrance"]; nwr["door"]; nwr["power"]; nwr["historic"]; nwr["emergency"]; nwr["advertising"]; nwr["man_made"]; nwr["aeroway"]; nwr["3dmr"]; way["place"]["place"!~"^(ocean|sea|bay|strait|sound|fjord)$"]; way; )->.relsinbbox; (way(r.relsinbbox); )->.waysinbbox; (node(w.waysinbbox); node(w.relsinbbox); )->.nodesinbbox; .relsinbbox out body; .waysinbbox out body; .nodesinbbox out skel qt;

p10 (tourism around25k)

[out:json][timeout:45]; (node["tourism"](around:25000,42.3601,-71.0589); way["tourism"](around:25000,42.3601,-71.0589); node["amenity"~"restaurant|cafe|bar|pub|nightclub|fast_food|food_court|biergarten|ice_cream|bakery"](around:25000,42.3601,-71.0589); way["amenity"~"restaurant|cafe|bar|pub"](around:25000,42.3601,-71.0589); node["amenity"~"theatre|cinema|museum|arts_centre|library|community_centre|concert_hall|studio"](around:25000,42.3601,-71.0589); way["amenity"~"theatre|cinema|museum|arts_centre"](around:25000,42.3601,-71.0589); node["leisure"~"park|garden|stadium|sports_centre|swimming_pool|beach_resort|water_park|marina|golf_course"](around:25000,42.3601,-71.0589); way["leisure"~"park|garden|stadium|nature_reserve"](around:25000,42.3601,-71.0589); node["shop"~"mall|department_store|supermarket|marketplace|clothes|books|gift|art|antiques|wine|craft|boutique"](around:25000,42.3601,-71.0589); way["shop"~"mall|department_store|marketplace"](around:25000,42.3601,-71.0589); node["historic"](around:25000,42.3601,-71.0589); way["historic"](around:25000,42.3601,-71.0589); node["natural"~"peak|beach|spring|cave_entrance|volcano|waterfall"](around:25000,42.3601,-71.0589); node["man_made"~"tower|lighthouse|windmill"](around:25000,42.3601,-71.0589); ); out body center 500;

p11 (brownfield bigbbox)

[out:json][timeout:180]; (way["landuse"="brownfield"](40.5,-80.0,47.5,-67.0); way["landuse"="landfill"](40.5,-80.0,47.5,-67.0); node["man_made"="dump"](40.5,-80.0,47.5,-67.0); way["abandoned:landuse"="industrial"](40.5,-80.0,47.5,-67.0); ); out geom;

p12 (clinic name ci around25k)

[out:json][timeout:30]; (node["amenity"="clinic"]["name"~"cosmetic|aesthetic|beauty|skin|plastic",i](around:25000,42.3601,-71.0589); way["amenity"="clinic"]["name"~"cosmetic|aesthetic|beauty|skin|plastic",i](around:25000,42.3601,-71.0589); node["healthcare"~"aesthetics|cosmetics",i](around:25000,42.3601,-71.0589); way["healthcare"~"aesthetics|cosmetics",i](around:25000,42.3601,-71.0589); ); out body center qt;

p13 (map call meta)

[bbox:42.355,-71.065,42.365,-71.055]; (node(42.355,-71.065,42.365,-71.055); way(bn); node(w); ); (._; (rel(bn)->.a; rel(bw)->.a; ); rel(br); ); out meta;

p14 (area by name worship)

[out:json][timeout:90]; area["name"="Massachusetts"]->.searchArea; (node["amenity"="place_of_worship"]["religion"="jewish"](area.searchArea); way["amenity"="place_of_worship"]["religion"="jewish"](area.searchArea); rel["amenity"="place_of_worship"]["religion"="jewish"](area.searchArea); ); out body 200;

p15 (tiny bbox many keys geom)

[out:json][timeout:25][bbox:42.3580,-71.0620,42.3624,-71.0565]; (node[amenity]; way[amenity]; relation[amenity]; node[building~"^(commercial|retail|office|public|civic|school|college|university|kindergarten|hospital|clinic|transportation|train_station|church|chapel|mosque|temple|synagogue|hotel|supermarket)$"]; way[building~"^(commercial|retail|office|public|civic|school|college|university|kindergarten|hospital|clinic|transportation|train_station|church|chapel|mosque|temple|synagogue|hotel|supermarket)$"]; relation[building~"^(commercial|retail|office|public|civic|school|college|university|kindergarten|hospital|clinic|transportation|train_station|church|chapel|mosque|temple|synagogue|hotel|supermarket)$"]; node[entrance]; node[highway~"^(bus_stop|crossing|elevator)$"]; way[highway~"^(bridleway|bus_guideway|cycleway|footway|living_street|motorway|motorway_link|path|pedestrian|primary|primary_link|residential|residential_link|road|secondary|secondary_link|service|steps|tertiary|tertiary_link|trunk|trunk_link|unclassified)$"]; relation[highway~"^(bridleway|bus_guideway|cycleway|footway|living_street|motorway|motorway_link|path|pedestrian|primary|primary_link|residential|residential_link|road|secondary|secondary_link|service|steps|tertiary|tertiary_link|trunk|trunk_link|unclassified)$"]; node[historic]; way[historic]; relation[historic]; node[indoormark="beacon"]; way[indoormark="beacon"]; relation[indoormark="beacon"]; way[landuse="construction"]; relation[landuse="construction"]; node[leisure]; way[leisure~"^(pitch|park|garden|playground|sports_centre|stadium|golf_course|marina|water_park)$"]; relation[leisure~"^(pitch|park|garden|playground|sports_centre|stadium|golf_course|marina|water_park)$"]; node[office]; way[office]; relation[office]; node[railway~"^(platform|station|subway_entrance|tram_stop)$"]; way[railway~"^(platform|station)$"]; relation[railway~"^(platform|station)$"]; node[shop]; way[shop]; relation[shop]; node[tourism]; way[tourism]; relation[tourism]; way[zoo="enclosure"]; relation[zoo="enclosure"]; ); out geom;

p16 (hgv restrictions bbox)

[out:json][timeout:120]; (way["maxheight"](41.2400,-73.5100,42.8900,-69.9300); way["maxweight"](41.2400,-73.5100,42.8900,-69.9300); way["maxlength"](41.2400,-73.5100,42.8900,-69.9300); way["maxwidth"](41.2400,-73.5100,42.8900,-69.9300); way["hazmat"](41.2400,-73.5100,42.8900,-69.9300); way["hgv"](41.2400,-73.5100,42.8900,-69.9300); node["maxheight"](41.2400,-73.5100,42.8900,-69.9300); node["maxweight"](41.2400,-73.5100,42.8900,-69.9300); ); out geom;

p17 (anchored regex around)

[out:json][timeout:15]; (node["amenity"~"^(restaurant|fast_food|cafe|pharmacy|school|food_court)$"](around:4828,42.3601,-71.0589); way["amenity"~"^(restaurant|fast_food|cafe|pharmacy|school|food_court)$"](around:4828,42.3601,-71.0589); node["shop"~"^(supermarket|grocery|convenience|bakery)$"](around:4828,42.3601,-71.0589); way["shop"~"^(supermarket|grocery|convenience|bakery)$"](around:4828,42.3601,-71.0589); node["leisure"~"^(park|recreation_ground|fitness_centre|fitness_center|dog_park|playground)$"](around:4828,42.3601,-71.0589); way["leisure"~"^(park|recreation_ground|fitness_centre|fitness_center|dog_park|playground)$"](around:4828,42.3601,-71.0589); relation["leisure"~"^(park|recreation_ground)$"](around:4828,42.3601,-71.0589); ); out center tags;

p18 (fuel bigbbox)

[out:json][timeout:420]; (node["amenity"="fuel"](40.5,-80.0,46.6,-69.7); way["amenity"="fuel"](40.5,-80.0,46.6,-69.7); ); out center;

p19 (venues bbox name ci)

[out:json][timeout:90]; (node["amenity"~"community_centre|arts_centre|theatre|cinema|concert_hall|events_venue|convention_centre|conference_centre|social_facility|public_building"](41.80,-72.00,43.05,-70.10); node["leisure"~"sports_hall|sports_centre|ice_rink|arena"](41.80,-72.00,43.05,-70.10); node["building"~"gymnasium|sports_hall|civic|hall|public|community_centre|grandstand|sports_centre"](41.80,-72.00,43.05,-70.10); node["amenity"="gym"](41.80,-72.00,43.05,-70.10); node["name"~"town hall|community center|community centre|recreation center|civic center|function hall|grange hall|vfw post|american legion|masonic|banquet|convention center|fairgrounds|exhibition center",i](41.80,-72.00,43.05,-70.10); way["amenity"~"community_centre|arts_centre|theatre|cinema|concert_hall|events_venue|convention_centre|conference_centre|social_facility|public_building"](41.80,-72.00,43.05,-70.10); way["leisure"~"sports_hall|sports_centre|ice_rink|arena"](41.80,-72.00,43.05,-70.10); way["building"~"gymnasium|sports_hall|civic|hall|public|community_centre|grandstand|sports_centre"](41.80,-72.00,43.05,-70.10); way["name"~"town hall|community center|community centre|recreation center|civic center|function hall|grange hall|vfw post|american legion|masonic|banquet|convention center|fairgrounds|exhibition center",i](41.80,-72.00,43.05,-70.10); relation["amenity"~"community_centre|arts_centre|theatre|cinema|concert_hall|events_venue|convention_centre|conference_centre|social_facility|public_building"](41.80,-72.00,43.05,-70.10); relation["leisure"~"sports_hall|sports_centre|ice_rink|arena"](41.80,-72.00,43.05,-70.10); relation["building"~"gymnasium|sports_hall|civic|hall|public|community_centre|grandstand|sports_centre"](41.80,-72.00,43.05,-70.10); ); out center tags;

p20 (office around25k)

[out:json][timeout:30]; (node["office"="hr"](around:25000,42.3601,-71.0589); way["office"="hr"](around:25000,42.3601,-71.0589); node["office"="consulting"]["name"~"hr|human resource|talent|workforce|people",i](around:25000,42.3601,-71.0589); way["office"="consulting"]["name"~"hr|human resource|talent|workforce|people",i](around:25000,42.3601,-71.0589); ); out body center qt;

Testing

Limitations and open questions

  • The file is recognised by its name suffix. A flag on File_Properties would be cleaner, at the cost of touching every file definition.


Generated by Claude Code

While a union whose statements will re-read the same blocks runs, the
transaction's Block_Cache keeps the decompressed blocks of every data file
it reads. Such statements share every filter apart from their tag filters,
so they read the same skeleton and local tag blocks, but look up different
tags in the global tag index: its blocks are not read again. They only
filled the cache, up to its limit, and cost a copy each.

Nonsynced_Transaction::data_index no longer attaches the block cache to
the *_tags_global files.

On a US northeast full-history extract (Geofabrik), warm cache, 4-core VM,
peak RSS, CPU as the median of 3 alternating runs:

  [out:json][timeout:90]; (way["maxheight"]["highway"](39.0,-70.0,40.0,-69.0); way["bridge"]["maxheight"](39.0,-70.0,40.0,-69.0); way["tunnel"]["maxheight"](39.0,-70.0,40.0,-69.0); node["maxheight"]["highway"](39.0,-70.0,40.0,-69.0); ); out center;
      74 MB -> 13 MB, CPU 0.36 s -> 0.33 s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01736kJWpJaGbt8ML6jz9N35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants