You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried resolving the issue using the support portal
Describe the bug
An api call to projects with lots of versions is still generally fast. For example requesting all versions of the viaversion project (648 versions at the time of writing) only takes about 0.8s:
time curl https://api.modrinth.com/v3/project/viaversion/version &> /dev/null
real 0m0.810s
user 0m0.023s
sys 0m0.000s
However, when fetching the featured versions, it takes more than 6 seconds!
time curl https://api.modrinth.com/v3/project/viaversion/version?featured=true &> /dev/null
real 0m6.825s
user 0m0.013s
sys 0m0.007s
This is especially annoying, since the featured versions are fetched for each project page load as seen here, which causes the viaversion project page to take over 6 seconds to load every time (and they aren't even displayed!).
At this point it would be faster to fetch all versions with https://api.modrinth.com/v3/project/viaversion/version and then filter them by featured versions client-side.
Interestingly, the same thing does not occur with the project fabric-api, which has even more (882 at the time of writing) versions:
time curl https://api.modrinth.com/v3/project/fabric-api/version &> /dev/null
real 0m0.586s
user 0m0.022s
sys 0m0.000s
time curl https://api.modrinth.com/v3/project/fabric-api/version?featured=true &> /dev/null
real 0m0.546s
user 0m0.018s
sys 0m0.000s
This leads me to believe, that the large amout of listed compatible game_versions in the case of viaversion slows down the code here.
Steps to reproduce
run time curl https://api.modrinth.com/v3/project/viaversion/version &> /dev/null
then run time curl https://api.modrinth.com/v3/project/viaversion/version?featured=true &> /dev/null
the second request takes more than 8x to complete
Expected behavior
fetching the featured versions should be roughly as fast as fetching all versions.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Please confirm the following.
Describe the bug
An api call to projects with lots of versions is still generally fast. For example requesting all versions of the viaversion project (648 versions at the time of writing) only takes about 0.8s:
However, when fetching the featured versions, it takes more than 6 seconds!
This is especially annoying, since the featured versions are fetched for each project page load as seen here, which causes the viaversion project page to take over 6 seconds to load every time (and they aren't even displayed!).
At this point it would be faster to fetch all versions with
https://api.modrinth.com/v3/project/viaversion/version
and then filter them by featured versions client-side.Interestingly, the same thing does not occur with the project fabric-api, which has even more (882 at the time of writing) versions:
This leads me to believe, that the large amout of listed compatible
game_versions
in the case of viaversion slows down the code here.Steps to reproduce
time curl https://api.modrinth.com/v3/project/viaversion/version &> /dev/null
time curl https://api.modrinth.com/v3/project/viaversion/version?featured=true &> /dev/null
the second request takes more than 8x to complete
Expected behavior
fetching the featured versions should be roughly as fast as fetching all versions.
Additional context
No response
The text was updated successfully, but these errors were encountered: