Open spmason opened 11 years ago
It does the following right now for a github ID like jrburke/requirejs/2.1.6
:
In your examples, the requirejs one is quicker because it has a package.json with a volo property for the given tag, where jquery does not. So, in general, things will get quicker if more projects add a "volo" property to their package.json. In the meantime, the slowness is a tradeoff for not requiring all projects to buy into volo right away, but still allow them to be usable.
I am open to trying other things though. In particular, I can see perhaps discarding the master package.json check and just rely on the tagged version or the overrides directory. Will need to think about it a bit more, going to move this to 3.0.1 which has some other tickets for possible speed ups.
What about cloning the actual gh repo locally and doing the checks on that? It may be a bigger one-time hit but then subsequent actions would be a lot faster (including getting the actual code when necessary). You would also get implicit 'caching' for free..
Failing that, some other kind of local cache for api responses maybe?
A local cache is planned, tracking in #114. No plans to do git clones though.
I'm seeing much slowness in volo, and through liberal use of console.time I've narrowed it down to the github resolver:
github resolve jrburke/requirejs/2.1.6: 546ms github resolve jquery/jquery/1.7.2: 1479ms
Any ideas on how to speed this up?