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

Theia's requests to open-vsx.org lead to huge responses #10538

Open
mbarbero opened this issue Dec 14, 2021 · 4 comments
Open

Theia's requests to open-vsx.org lead to huge responses #10538

mbarbero opened this issue Dec 14, 2021 · 4 comments
Labels
open-vsx issues related to the open-vsx registry

Comments

@mbarbero
Copy link

The Eclipse Foundation is operating open-vsx.org and we noticed that the requests POST /api/-/query (which are Theia specifics AFAIK), leads to 2.5+MB of gzipped json responses. This consume a large chunk of the Eclipse Foundation bandwidth to the detriment of other services / projects.

Would it be possible to reduce the amount of data retrieved by those requests? Would it need some changes on the openvsx server to be more efficient?

@mbarbero mbarbero changed the title Theia's requests to open-vsx.org lead to hug responses Theia's requests to open-vsx.org lead to huge responses Dec 14, 2021
@vince-fugnitto vince-fugnitto added the open-vsx issues related to the open-vsx registry label Dec 14, 2021
@vince-fugnitto
Copy link
Member

@mbarbero thank you for the discussion!

we noticed that the requests POST /api/-/query (which are Theia specifics AFAIK), leads to 2.5+MB of gzipped json responses.

I don't believe the post endpoint for query is used any longer (#10325).

@msujew
Copy link
Member

msujew commented Dec 14, 2021

I imagine that a lot of users still use older versions of Theia (#10325 was only included in 1.19). Ideally during the next few months, people update their Theia installations and start using the GET endpoint, which is caching everything, reducing the load drastically. However, I'm not sure whether using cached responses reduces the bandwidth-load considerably.

@spoenemann
Copy link
Contributor

The amount of data returned by the GET endpoint is the same, so we could have a closer look what information we really need and add additional options to control what is included in the response.

@amvanbaren
Copy link

I can add offset and size query parameters to add paging to the /api/-/query endpoint. The /api/-/search endpoint has the same parameters to limit the response size. offset and totalSize are added to the query response, so that you can page through the extensions.

On the Theia side you then need to implement paging for the getAllVersions function.

async getAllVersions(id: string): Promise<VSXExtensionRaw[]> {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-vsx issues related to the open-vsx registry
Projects
None yet
Development

No branches or pull requests

5 participants