-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GDScript 2.0: .gdc
bytecode files not created with export option
#59241
Comments
.gdc
bytecode files not created with export option
This option needs to be removed, this feature won't be added to Godot 4.0. For the record, my plan is to add an intermediate representation, so we can store compiled scripts in the export, which is a much better solution than the current one (present in 3.x). The problem is that this won't happen before 4.0 is out. But adding the mentioned feature here would be a good amount of effort for a half-measure that would be obsoleted in the next Godot version. |
@vnen Could you explain in more detail what intermediate representation means and how this new method differs from the current script tokenization in 3.x? Thanks! |
A bit late, but here's an explanation. What is done in 3.x is converting the tokens in the file to a binary format. For example, if in the source script you have That's the only thing done though. The tokenization phase is almost free in this case but the script still has to be parsed and compiled when loading. With an intermediate representation, the script is stored as a file already tokenized, parsed, and compiled. For a similar example, the line This has more benefits besides loading performance:
|
This may have to remain something done in custom export template builds regardless, as it'll prevent hot-loading of custom hand-written GDScript code in exported projects (which can be desired in some situations). That said, this is an uncommon use case, so maybe it's OK to have this be something you explicitly have to compile support for. |
@Calinou we could just keep that for debug releases. That might be a problem if the editor can also run release binaries (can it?), but I think that this would be a nice compromise. |
@Riteo AFAIK the editor doesn't run any template executable, it always runs the same executable as the editor itself. Also, my idea was to make it optional, I should've made that clear. We could consider whether or not we want to remove it from default/official builds but we can take that decision when the time comes. |
Godot version
5d806b4
System information
Windows 10 x64
Issue description
This option
does not work. The pck/zip still contains original
.gd
files, with no.gdc
.Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: