-
Notifications
You must be signed in to change notification settings - Fork 150
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
Are we managing extension files efficiently #980
Comments
Some context: #432 I've deployed a proof of concept to staging where resource files are extracted from the vsix package on the fly. The response to the initial request is slower, but reasonable (2 - 3 seconds). The response is cached for 30 days, so subsequent requests are faster. |
@amvanbaren Thanks, this seems a reasonable approach. But before we go there, I'd like to understand a bit more about the use case(s).
|
These calls are coming from VS Code based editors. The info returned by the API was insufficient, because it was only returned for extensions with
The tags list in the extension.vsixmanifest file was used.
All files in the extension folder were recursively added to the
This is not on the extension level. A resource is requested for a specific version of an extension.
Yes, it is to keep feature parity with the MS VS Code API: |
@amvanbaren Thanks for the additional info, this is helpful. A couple of follow up questions.
|
Yes, I think the desktop editor uses local files. It looks like this functionality is used by VS Code server deployments, like the Gitpod openvscode-server.
That could be possible too.
It can through the |
@amvanbaren we believe we're seeing calls (not through the Ultimately I think we're going to need to sample our access logs again to get a better picture. Can you recommend a text filter to limit the entries we're looking for? |
File endpoints
The last part of the url can be a file type (
Resource endpoint
Every call to this endpoint uses the resource file type.
VSIX package download endpoint
Returns redirect to download vsix package.
Asset endpoint
Returns asset file.
regex to get only resources:
other asset types:
|
@amvanbaren Thanks, this is really helpful. It looks like these paths are defined here: https://github.com/eclipse/openvsx/blob/master/server/src/main/java/org/eclipse/openvsx/web/WebConfig.java. Do all of these URLs and asset types result in references to the I also noticed a path It seems like to get a handle on URLs (not part of the API) that cause references to the |
The |
@amvanbaren I think I understand. Ultimate goal is to reduce the size of the |
Yes, sounds right. You can further narrow down |
What about? Do these not cause a file lookup?
|
openvsx/server/src/main/java/org/eclipse/openvsx/adapter/LocalVSCodeService.java Line 354 in 20c549e
openvsx/server/src/main/java/org/eclipse/openvsx/adapter/LocalVSCodeService.java Line 380 in 20c549e
|
As it was discussed with @kineticsquid, I am putting my thoughts about caching implementation here. Just to save them in some place where everybody can see it. The question is about getting rid of the
I haven't looked at scenarios to add cache as a separate application, like Redis or memcached, because it might make the setup unnecessary complex. I aldo don't know if Elastic could be used as a key/value storage. |
The origin of this is EclipseFdn/open-vsx.org#2317. Ultimately our objective is, for a variety of reasons, to keep the size of our DB manageable. The
file_resource
table is by far the largest. I poked at this a bit in a Gitpod workspace. In that sample workspace, there are 22 extensions, 40 versions, and a little over 99K entries in the file table. It looks like, in addition to the files listed in the extensionpackage.json
file, e.g. readme, download, license, icon, all the files included in the.vsix
file are also listed in this table. The type isresource
: https://raw.githubusercontent.com/kineticsquid/openvsx/master/output.txt.Separately, looking at a sample of the open-vsx.org access logs, I can see
/file
API calls requesting these files.I can understand the access to the icon, license, readme files for all the versions of an extension. I don't understand the logic that results in access requests to these other files. Unfortunately, I don't understand the code enough to figure out where these calls are coming from, UI or server.
@amvanbaren @filiptronicek @spoenemann Any insight or background on this?
The text was updated successfully, but these errors were encountered: