visualization-tool icon indicating copy to clipboard operation
visualization-tool copied to clipboard

performance issue: fetch all the necessary *DataCubeMetadata* within a single RDF query

Open Rdataflow opened this issue 2 years ago • 1 comments

Issue Performance

Describe the solution you'd like visualize fires 1 (one) single optimized rdf query to get all the necessary DataCubeMetadata within a single RDF query

Describe alternatives you've considered Add more nodes the the server cluster 🙃

Usecases and impact offload the server and gain performance

Current situation

  • Query for DataCubeMetadata https://github.com/visualize-admin/visualization-tool/blob/28b8e9a34598618ed570ddf03a699b5f521f8df8/app/graphql/query-hooks.ts#L1339
  • asks for https://github.com/visualize-admin/visualization-tool/blob/28b8e9a34598618ed570ddf03a699b5f521f8df8/app/graphql/query-hooks.ts#L1327-L1334
  • by triggering further rdf queries i.e. https://github.com/visualize-admin/visualization-tool/blob/28b8e9a34598618ed570ddf03a699b5f521f8df8/app/graphql/resolvers/rdf.ts#L147-L155

Future situation (example)

  • DataCubeMetadata triggers 1 (one) highly optimized DESCRIBE or better CONSTRUCT query i.e. inspired from the
  • performant example query https://s.zazuko.com/2ZsvzVy (proof-of-concept) ... to be further optimized i.e. include shape

NB: the same solution may be relevant in other places as well

Rdataflow avatar Sep 24 '23 08:09 Rdataflow

opening preview page https://test.visualize.admin.ch/browse?dataset=https%3A%2F%2Fenvironment.ld.admin.ch%2Ffoen%2Fnfi%2Fnfi_C-90%2Fcube%2F2023-2&dataSource=Prod currently triggers 2 rdf queries on client side. (probably to determine the shapeIRI) a) https://s.zazuko.com/rtoThC b) https://s.zazuko.com/2qdXKfz

  • [ ] this may be merged with the single query as well... (see proposed query above fits so)

Rdataflow avatar Sep 24 '23 09:09 Rdataflow