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

Add stream support back #474

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Add stream support back #474

merged 1 commit into from
Aug 22, 2024

Conversation

ludovicm67
Copy link
Member

With the previous release, we were hit by an issue that prevented the sparql-proxy plugin to use streams if compression was requested, and we temporarily replaced them with awaited strings.

The issue with this was that responses were a bit slower as the plugin was waiting to get the full data from the endpoint before sending it to the client.
Also, in terms of memory usage, it was not ideal.

Using the workaround given in fastify/fastify-compress#309 (comment) seems to solve the issue.

There was just an issue in terms of types that were reported ; as it behaves correctly, I just disabled the type error by using a cast to any for the responseStream variable.

Copy link

changeset-bot bot commented Aug 22, 2024

🦋 Changeset detected

Latest commit: a257043

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@zazuko/trifid-plugin-sparql-proxy Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ludovicm67 ludovicm67 merged commit 49917a2 into main Aug 22, 2024
7 checks passed
@ludovicm67 ludovicm67 deleted the sp-reenable-stream branch August 22, 2024 05:09
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.

1 participant