Sharing plugins and libraries between IntelliJ Platform products?

已回答

It is quite often the case that multiple JetBrains IDEs are installed on a PC. It is also obvious they do share a lot in terms of "platform". 'jreXX' folders many jars in 'lib' a lot of plugins.

These four folders occupy 1275 MB for IDEA 2017.3. Other IDEs are also close to that figure.
So I need about 4 GB for three IDEs. And most of that space is occupied by the duplicated files.

What do you think of introducing some kind of local "platform repository" for libraries and plugins and also sharing jreXX folders between IDEs?

Apart from optimizing disk space usage it should also reduce updates size considerably.
(PyCharm would not need to download new version of git4idea plugin since it has been downloaded already by WebStorm update)

1

IDE versions are not always in sync, so it may be not possible to share the common parts between different products. They can be bundled with different JRE and with different platforms. It's really complicated and probably not worth the efforts to save several gigabytes of space.

0

That issue is about the "flag" if particular plugin is installed (and totally makes sense!). As far as I understand it also only concerns plugins installed from repository, not bundled ones.

I was talking about sharing plugin files on disk however. Also for bundled plugins. So that I don't have two copies of the same git4idea plugin, one in PyCharm/plugins and another in WebStorm/plugins.

0

Since versions are not always in sync, PyCharm/WebStorm/PhpStorm and IntelliJ IDEA having the same version number may have plug-ins and JDK of different versions.

0

> They can be bundled with different JRE and with different platforms.

 

That's why I talked about "repository", not sharing 'lib' and 'plugins' folders directly. Just like in local Maven repo there could be different versions of the platform artifacts there. And each IDE would use its own specific dependencies.

Now forgotten Java Web Start could be another example of the concept.

At 1 user scale a couple of gigabytes would not matter that much, indeed. But across your user base that's like what, petabytes of wasted space? And also terabytes of wasted traffic you potentially would not have to pay for. :-)

But I understand the argument about complexity. Just wanted to share the idea.

0

What is the purpose of the repository if you have different IDEs installed which use different platform and plug-in versions? They will still download their own versions of the plugins/JDKs and you will not save any disk space.

0

I did a quick and dirty comparison. I took the latest releases of PyCharm (2017.2.4-Pro) and WebStorm (2017.2.5). And then compared their folders and jars recursively ignoring files modification time and only comparing the contents.

Here are the results:

            PyCharm     WebStorm    overlap
jre32       142 MB      142 MB      142 MB
jre64       151 MB      151 MB      151 MB
lib           219 MB      191 MB      67 MB
plugins    165 MB      197 MB      62 MB

Thus there is a 422 MB overlap in total. That's 62% of the size of either IDE.

It could be improved even further if this aspect was taken into account. For example, the only difference between  PerforceIntegration.jar (2 MB) is in the org.jetbrains.idea.perforce.perforce.ConfigPanel class. cvsIntegration.jar (2 MB) also has differences only in two UI classes - CvsConfigurationPanel and ProxySettingsPanel.
And it looks like this differences are caused by the build environment with some methods called in a different order (setEditable() + setText() vs setText() + setEditable())

Another example is lib/resources_en.jar (15 MB). There are many files there that have minor and really unnecessary differences. For example "may" vs "might want to" in \tips\EvaluateExpressionInEditor.html or "&productName;" vs "WebStorm" in \tips\Reopen.html. Also there are images that don't have any IDE specific "context" and could have been unified, e.g. \tips\images\annotationShowDiff.png, coloredFiles.png, goto_class.png

By the way I've also discovered that some files in WebStorm "tips" (e.g. ClosingTag.html and DiffChevron.html) have invalid images paths:
<img src="../../../../../Downloads/10.0/images/closing_tags.png">

I understand it is not your highest priority. But I thought you might still want to consider it.

1

You can start with a formal feature request at https://youtrack.jetbrains.com/issues/IDEA and we'll consider it depending on the demand.

0

Ok, I'll do it next week.

In the meantime here is the tips images paths issue - WEB-29674

0

> Ok, I'll do it next week.

 

Any progress on this?

1

I didn't get to submit the "formal feature request" yet. Sorry.

I'll summarize it and create a ticket tomorrow. And will then post a link here.

0
Avatar
Permanently deleted user

I think some plugins such as ideavim can share to all IDE of intellij platform.

0

请先登录再写评论。