Senth / minecraft-mod-manager

Install and update mods from CurseForge and Modrinth through a CLI
MIT License
75 stars 7 forks source link

Skip downloading already up to date files on update #139

Closed theofficialgman closed 2 years ago

theofficialgman commented 2 years ago

Maybe I'm looking at this wrong, but it seems like when the "update" command is used, the latest version of installed mods are downloaded and replace the current installed versions regardless if the currently installed version is up to date already.

On my end this makes for the 'update' command to take a long time (about an extra 1.5 seconds per mod). This seems unnecessary. Is there a faster way this could be implemented to avoid downloading the whole mod every time (maybe comparing metadata from curse/modrinth is faster?)

Senth commented 2 years ago

Hi @theofficialgman,

A very late reply, but thank you for all the bug reports and enhancements! 🙂 It's very helpful finding and improving the "app" 😊

This has now been fixed and will be released for v1.3. I only have two more bugs left before releasing that version. I'm making a big push this weekend, so hopefully, v1.3 will be released later today or by tomorrow 🙂

Thanks again, and sorry for the late reply!

theofficialgman commented 2 years ago

Hi @theofficialgman,

A very late reply, but thank you for all the bug reports and enhancements! slightly_smiling_face It's very helpful finding and improving the "app" blush

This has now been fixed and will be released for v1.3. I only have two more bugs left before releasing that version. I'm making a big push this weekend, so hopefully, v1.3 will be released later today or by tomorrow slightly_smiling_face

Thanks again, and sorry for the late reply!

no worries, we all get busy and I know you do this on your free time. Thanks for your continued work on this and work on the CLI.

theofficialgman commented 2 years ago

is this the intended output now? installed all these mods with mmc and then issued an update takes about 1-2 seconds per mod still

mmm -v 1.18.2 --beta --alpha update
lazydfu
    🔍 Searching for mod
fabric
    🔍 Searching for mod
spark
    🔍 Searching for mod
sodium
    🔍 Searching for mod
pinglist
    🔍 Searching for mod
modmenu
    🔍 Searching for mod
voicechat
    🔍 Searching for mod
betterbeds
    🔍 Searching for mod
ferritecore
    🔍 Searching for mod
starlight
    🔍 Searching for mod
lithium
    🔍 Searching for mod

edit: oh I see you put the already up to date behind the verbose output, I missed that when looking at the commit the first time

just reading the output, it seems like this goes by quickly

lithium
    🔍 Searching for mod
        🔍 Searching for lithium on Sites.curse
        🟢 Found lithium on Sites.curse
        🔍 Searching for lithium on Sites.modrinth
        🟢 Found lithium on Sites.modrinth

and then it takes anywhere from 0.2-1second to output

    🔵 Already up-to-date

looking into this... this seems to just be the slowness in the api response rate... its interesting how getting if the mod exists at all is so much faster than the versions for that mod

Senth commented 2 years ago

Yeah, I'm thinking that this will be solved in a future release when I'll come around and allow parallelized downloads. But for that, I also want to make sure the output it displays looks good. Might make it into v1.4, but could also be some time in the future.

I also have to do some changes to use the new CurseAPI. The old one was supposed to stop working, but it seems to continue working. Praying that it doesn't stop before I've implemented the backend for those calls.