Skip to content
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

Lite version of the project #553

Open
mehdi-najaran opened this issue Jan 10, 2024 · 8 comments
Open

Lite version of the project #553

mehdi-najaran opened this issue Jan 10, 2024 · 8 comments

Comments

@mehdi-najaran
Copy link

Hello, is it possible for you to provide me with a light and compact version of the project?

A version without the ability to connect to GitHub
Version without comments
Special version for updating the plugin (without theme)

In this way, less code and volume is occupied in the project

@YahnisElsts
Copy link
Owner

No, probably not.

It doesn't seem useful enough to be worth the effort. This isn't a JS library that has to be downloaded by every visitor. It just sits on the server. I think going to great lengths to reduce the size wouldn't yield much of a benefit.

@mehdi-najaran
Copy link
Author

Now I put the project file in my plugin core

This issue has increased its volume, am I wrong?

@YahnisElsts
Copy link
Owner

You are not wrong. By adding PUC to your plugin, the size of your plugin download has increased by about 150 KB (zipped).

But what is the meaningful impact of that? Your users will have to spend a fraction of a second longer downloading your plugin, and it will take up about 360 KB more space on their server. Will they even notice? How much does that matter, and how much time are you willing to spend to optimize it? Personally, it doesn't look very significant to me.

(I'm aware that this sounds suspiciously similar to the kind of reasoning that some careless people might use to justify e.g. websites adding megabytes of JS to every page, but I think scale does matter here. Installing a plugin is generally a one-time kind of thing, or close to that.)

@mehdi-najaran
Copy link
Author

Yes you are right .
But keep this issue that I have raised as an idea and suggestion in the corner of your mind, and implement it whenever you can.

Because, for example, my plugin is 80 kilobytes in size and is highly optimized. If a 150 KB project is added to it, it will really stand out

@YahnisElsts
Copy link
Owner

All right.

@DavidAnderson684
Copy link
Contributor

Removing parts of a project can be unexpectedly dangerous: if multiple plugins are using this library, and the one that gets loaded is a version with some classes removed, then that may cause the plugins that expected the full version to be present to have a problem.

@YahnisElsts
Copy link
Owner

That is also a good point, and one that didn't occur to me. Though to be fair, it would be possible to redesign the library to still work correctly in that situation - it would just take even more work.

@theo-gk
Copy link

theo-gk commented May 9, 2024

@mehdi-najaran You can safely remove the translation files from the /languages/ directory in case you don't need them. It will save you more than 80KB. But it will have no effect in performance, just in file size. Probably isn't worth it, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants