Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a cube loader #819

Merged
merged 7 commits into from
Nov 2, 2022
Merged

Use a cube loader #819

merged 7 commits into from
Nov 2, 2022

Conversation

ptbrowne
Copy link
Collaborator

@ptbrowne ptbrowne commented Nov 2, 2022

While investigating queries, I noticed that we were loading the cubes a lot,
since the dataCubeByIri resolver is high and needs to load the cube shape.
Since the cube can be shared across resolvers, I used a loader.
Since the cube does not change a lot, I added also an application level
cache through the cachedWithTTL helper. This means that even across requests,
within a 60s timespan, the cube will be resolved through a cache.

How to test

Every interaction with cubes in the cube configurator should be faster.

@vercel
Copy link

vercel bot commented Nov 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
visualization-tool ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 4:01PM (UTC)

Copy link
Collaborator

@bprusinowski bprusinowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, really nice change 👏

app/rdf/query-literals.ts Show resolved Hide resolved
@ptbrowne ptbrowne merged commit a94a977 into main Nov 2, 2022
@ptbrowne ptbrowne deleted the perf/cube-loader branch November 2, 2022 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants