mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add Drawbacks subsection headers
This commit is contained in:
@@ -57,8 +57,12 @@ Any package that opts into this behavior must adhere to these rules:
|
||||
|
||||
## Drawbacks
|
||||
|
||||
### Possible API incompatibility
|
||||
|
||||
The primary drawback of this approach is that updateable bundled packages might exhibit problems on older Atom versions due to missing or changed APIs in Atom, Electron, or Node.js. The solution for these packages is to keep their `engines` field updated appropriately, but there's still a chance that some updates will slip through without the necessary engine version changes. If this does occur and users are affected by it, the solution is to publish a new update which rolls back the package to the functionality of its previous release and then publish another new update with the new functionality restored and the proper `engines` version in place.
|
||||
|
||||
### Increased Atom startup time
|
||||
|
||||
Another major drawback is that the snapshotted code for the bundled package will no longer be used since a newer version has been installed. This updated version of the package cannot be easily added back into Atom's snapshot so it could cause a noticable drag on Atom's startup time. Some quick measurements with Timecop show a 10x increase in GitHub package load time for bundled (snapshot) vs updated (non-snapshot) package code:
|
||||
|
||||
| GitHub Package Code | Load Time |
|
||||
@@ -69,6 +73,8 @@ Another major drawback is that the snapshotted code for the bundled package will
|
||||
|
||||
There was no measurable effect on shell or window startup time, only package load time. It seems that the transpilation phase of the first load of the package incurs a 100x increase in load time. Pre-transpilation of the package code (either when shipped or when installed using `apm`) will be useful in mitigating this cost. Further investigation into snapshotting package code will be needed to understand if the load time increase can be mitigated.
|
||||
|
||||
### Incompatibility across Atom release channels
|
||||
|
||||
One other possible drawback is that an updated version of a bundled package might not be compatible across two different Atom channels. For example, if the user installs a new update to a bundled package that only supports the current Atom Beta release or higher, the user will no longer have access to that package if they open Atom Stable. However, this drawback is no different than what the user would face today installing a community package under the same circumstances, so this could be considered a general problem in the Atom package ecosystem.
|
||||
|
||||
Finally, one risk of this approach is that the Atom team forgets to update a bundled package to its latest appropriate version on `apm` just before a new release. If this happens, the user will install a new Atom update and then be prompted to update a package that should have been snapshotted and shipped in-box. To avoid this problem we could add some build automation that checks for the latest version of a bundled package to see if the current Atom build would be supported by it.
|
||||
|
||||
Reference in New Issue
Block a user