platformio / platformio-core

Your Gateway to Embedded Software Development Excellence :alien:
https://platformio.org
Apache License 2.0
7.87k stars 792 forks source link

Chinese mirror of the package registry #4345

Closed chubbyginger closed 2 years ago

chubbyginger commented 2 years ago

What kind of issue is this?

Configuration

Operating system: Windows 10 Home 21H2 64-bit

PlatformIO Version (platformio --version): PlatformIO Core, version 6.0.2

Description of problem

I am a PlatformIO user from China. It is all known to devs in China that there is a You-Know-What system that will cause accessing github.com becoming very, very, very slow or even unreachable (ERR_CONNECTION_RESET).

When I create a PlatformIO project, it will download a lot of data, including toolchains, SDKs, etc from github or some places like that. Thus the process is extremely slow and it takes hours to install that. In many situations there is completely no network activity.

internet

I think it is appropriate for PlatformIO developers to add a import function which can import pre-downloaded toolchains, SDKs, etc (NOT the ones downloaded from the "Platform" page. Seems that it is only a project framework.). There should also be a place to manually download the files, so that I can call my friends to help me download them.

Steps to Reproduce

Create a new project.

Actual Results

The project wizard stuck there showing

Please wait...
The first initialization requires Internet connection and may take a while (need to install dependent toolchains, frameworks, SDKs).
Please be patient and let the initialization complete.

Expected Results

Project can be created successfully

ps. My board: Espressif ESP32 Devkit

ivankravets commented 7 months ago

Thanks for your feedback. What is your current download speed without proxy for https://dl.registry.ns3.platformio.org/tools/08/c7/7511ca5c84f8e747e04d6d0021c98d0c8ffef7c588782b0aec5b92ff5691/framework-espidf-3.40401.0.tar.gz ?

ivankravets commented 7 months ago

@wdq4587, please keep us updated regarding download speed. We always try to provide the best download speed for Chinese users. We frequently rotate our CDN nodes in exploration for better services.

I also like the idea of "download resuming". Please file a new feature at https://github.com/platformio/platformio-core/issues and we will try to implement it.

wdq4587 commented 7 months ago

Many Github-like web servers using a token for downloading. This token has a limited lifespan and attempting to download again will generate a new URL with a different token. This makes it impossible to resume downloading using a browser or downloader. As I am not familiar with Python, I am unsure if it is possible to resume downloading using a Python script. @ivankravets