Suggestion Bigger resource size limit

Discussion in 'Community Feedback and Suggestions' started by MrIvanPlays, Nov 24, 2019.

  1. The 5 MB size limit is too small for some plugins. Yes, for free plugins you have external download which is perfect, but what about premium plugins? Lets say your premium plugin has the following dependencies shaded into the jar: mongodb java driver, jedis driver, bstats metrics. The following result in a jar more than 5 MB. You can't upload that to spigot. So to decrease the jar size you use some kind of dependency downloader, but then your premium resource would be rejected because in the premium resource guidelines clearly says that the plugin should run without the server having internet connection.

    So my suggestion is either increase the size limit or allow premium plugins to download stuff such as needed dependencies for it to run.
    • Agree Agree x 3
  2. MiniDigger


    Use maven shades minimize option.
  3. minimizeJar most of the times break the program's functionality.
  4. MiniDigger


    Uuhm, make sure you are not running ancient versions of the plugin and maven. It works just fine, even on giant projects and multi module projects.
  5. Otherwise, there is an option when exporting a project that unnecessary files such as the libs folder, the .gitignore, target folder, and so on can be removed from the check box so that those files are not exported.

    But there are still a few ways we can reduce the size of our project:
    - TABs and spaces are removed from the code
    - We try to do what we want with as little code as possible, such as the multi-version plugin, to avoid separate version-dependent .class files and use Java Reflections, or to compress them into a file.
    - Create as few files as possible in our project.
    - Configuration files are loaded by creating a file and loading only using YamlConfiguration (not fully loaded)
  6. MiniDigger


    Wat. Those are not complied to bytecode anyways.

    Uuhm, when using maven I don't see how any of those files would end up in your jar
    • Like Like x 1
    • Agree Agree x 1
  7. By building with maven or gradle these folders aren't being compiled into the jar.

    This is all bad practices. Reflection is bad practice and whenever you can, try to avoid it. Few lines most of the times means worse code readability which is very important for the easier maintenance of that code.
  8. If you make a blank .txt file on your desktop and make it full of space, you will see how much it will be.

    This depends on the fact that if a project does not have a maven download center, it should be used anyway.
  9. One thing is a .txt file, and completely another thing is java's compiler and bytecode.
  10. MiniDigger


    I don't even know how to reply to that.
    Try opening a jar and look for spaces ;)
    • Winner Winner x 6
  11. md_5

    Administrator Developer

    So provide the option for manual downloading
  12. Bstats metrics ? Isn't that like 5kb ?
  13. When I do: Would a resource be accepted which depends on a library .jar File to be loaded & wouldn’t enable if it wouldn’t be possible to download the .jar files. But you would have a possibility to download manually?
  14. MiniDigger


    That's exactly what he's saying.
    If you don't find a dependency and can't download -> don't enable. But have a download link to the dependency on the resource page where you can download it manually.
    • Like Like x 1
    • Winner Winner x 1
  15. No. Its somewhere around 40 kb.

    I don't think server admins can navigate into a maven repository, can they? (well yes, I can give them direct download links but then if I update the dependency version I should change that and so im being a lazy ass and maybe I will forget about it). I can make a free plugin which downloads them tho but I think it will still violate the premium resource guidelines.
  16. MiniDigger


    Just have a short link which you can update?
  17. Yeah, so the problem is that I might forget about these too
  18. MiniDigger


    I don't get how. You would use the same link in your plugin to download the dependencies automatically if possible. So if you just change it if you update the dependencies.
  19. Ehm, no. I will use direct repository download links which update automatically when I change that version.
  20. MiniDigger


    Point is, it doesn't matter how you implement it, it's possible within the rules.
    If you are unable to update a link when you update your plugin (and well, not every plugin update should require dependency updates anyways), you should reconsider your fitness for being a developer.
    • Agree Agree x 5
    • Winner Winner x 1