Deomid Ryabkov introduces us a method of flashing ESP8266 in 5 sec. To achieve that he used a modified ESPTool. More details on the link below.
If you are developing for ESP8266, you may be familiar with esptool, which is a tool that you use to upload your code to the device. And it will do so, but if, like Smart.js, your firmware is non-trivial in size, you’ll be waiting a non-trivial amount of time for it to upload:
ESP8266 superfast flashing: flash ESP in 5 seconds – [Link]