Skip to content

Conversation

@vowstar
Copy link
Contributor

@vowstar vowstar commented Apr 12, 2019

Now tar.xz format is widely used, and the official arduino
IDE download URL also shows that arduino uses tar.xz format.
(https://downloads.arduino.cc/arduino-1.8.9-linux64.tar.xz).

As we all know, the tar.xz format has the optimal size compared to tar,
tar.gz, tar.bz2, and zip.
(https://www.rootusers.com/gzip-vs-bzip2-vs-xz-performance-comparison/)

Therefore, it is very unreasonable not to support tar.xz.

Supporting this format can save almost half of the bandwidth resources
and download time when compressing the gcc toolchain,
making users more comfortable.

Screenshot from 2019-04-12 12-00-59

Now ```tar.xz``` format is widely used, and the official arduino
IDE download URL also shows that arduino uses ```tar.xz``` format.
(https://downloads.arduino.cc/arduino-1.8.9-linux64.tar.xz).

As we all know, the tar.xz format has the optimal size compared to tar,
tar.gz, tar.bz2, and zip.
(https://www.rootusers.com/gzip-vs-bzip2-vs-xz-performance-comparison/)

Therefore, it is very unreasonable not to support tar.xz.

Supporting this format can save almost half of the bandwidth resources
and download time when compressing the gcc toolchain,
making users more comfortable.

Signed-off-by: Huang Rui <[email protected]>
@per1234 per1234 added the feature request A request to make an enhancement (not a bug fix) label Apr 12, 2019
@vowstar
Copy link
Contributor Author

vowstar commented Apr 15, 2019

@cmaglie

@facchinm
Copy link
Member

I think that adding tar.xz support can be a good idea; the only problem is that it introduces a minimum IDE version for the cores using it, and we are currently missing a flag to tell the user about this.
Adding an entry like minimum_ide_version in the json format won't solve the issue anyway since the older IDEs couldn't interpret it anyway, resulting in strange and unexplainable errors).
@cmaglie any idea? Should we add support on the cli maybe and use the switch as a turning point?

@sandeepmistry
Copy link
Contributor

Is there any way we could have a fallback URL?

@vowstar
Copy link
Contributor Author

vowstar commented Apr 16, 2019

Some possible suggestion:
Let the server return a specific json according to the arduino version, only return the tar.xz with the version number greater than a certain value, and the rest return tar.bz2/gz or zip. Users using the latest version of arduino can add a suffix to the URL to let the server recognize arduino version. Let server do this.

Another way is to have the server statically provide two versions of json, one for the new version and one for the old version. This gives the user the possibility to choose. And after a certain life cycle (such as the life cycle of a mainstream operating system), fully support tar.xz. Let user choose.

@facchinm
Copy link
Member

The fallback/alternative url could work; I'm a bit scared in replacing json entries on the fly but it could work if handled correctly. Anyway, if we choose this way, we should apply all the relevant patches to https://github.com/arduino/arduino-cli first of all

@cmaglie
Copy link
Member

cmaglie commented Apr 18, 2019

IMHO we should just add support for .xz without changing any existing json.
We can't swtich to .xz on the main Arduino package index because this will cause a massive amount of support requests, it's not worth the gain.

@vowstar
Copy link
Contributor Author

vowstar commented Apr 26, 2019

Is there any update?

@vowstar
Copy link
Contributor Author

vowstar commented Jul 16, 2019

@cmaglie @facchinm @sandeepmistry Hello, is there any plan to merge this branch?

@facchinm facchinm merged commit c88ff31 into arduino:master Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request A request to make an enhancement (not a bug fix)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants