Optimize the generation of "app_dir"#656
Open
EurynomeKeros wants to merge 2510 commits intokitao:mainfrom
Open
Optimize the generation of "app_dir"#656EurynomeKeros wants to merge 2510 commits intokitao:mainfrom
EurynomeKeros wants to merge 2510 commits intokitao:mainfrom
Conversation
line 663 in Tilemap Class The example for "set" uses a deprecated notation to access tilemaps Example: pyxel.tilemap(0).set(0, 0, ["0000 0100 a0b0", "0001 0101 a1b1"]) It should be Example: pyxel.tilemaps[0].set(0, 0, ["0000 0100 a0b0", "0001 0101 a1b1"])
Contributor
Author
|
Rename the environment variables to better comply with the pyxel specification and avoid conflicts with other environment variables.It is also possible to set the environment variable as a property of pyxel, just like the "WINDOW_STATE_ENV" property, but I'm not sure if this is redundant because "app_dir" is generated by the program and should not allow users to customize it |
59f76dd to
23a80d9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Reproduction
Use the

app2execommand to package it as an application and execute it. The "pyxapp" file will be decompressed twice in the temporary directory of the systemUse the

app2execommand to package it as an application and execute it. Whenever thepyxel.reset()method is triggered, the "pyxapp" file will be repeatedly decompressed in the system's temporary directoryImpact
This will lead to performance degradation during the application's runtime and some unknown issues
Optimization
In the startup logic of the application, set an environment variable to record the decompression path of the "pyxapp" file. When the startup logic is triggered again, prioritize obtaining the decompression path from this environment variable to avoid further decompression operations