Skip to content
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

Bump toml_edit in build-template-pages tool #11342

Merged
merged 5 commits into from
Jan 16, 2024

Conversation

BD103
Copy link
Member

@BD103 BD103 commented Jan 14, 2024

Objective

Solution

  • Bump toml_edit to 0.21, disabling all features except parse.

Also only enable the parser feature. The other default feature, display, is not needed in this circumstance.
This involves toggling off Tera's default features so crates such as rand are not pulled in. The only thing I had to do was recreate the slugify filter, since that is used in a template.
@mockersf
Copy link
Member

mockersf commented Jan 14, 2024

I don't think taking the same complexity of slugify is worth a 3 seconds decrease

@BD103
Copy link
Member Author

BD103 commented Jan 14, 2024

I don't think taking the same complexity of slugify is worth a 3 seconds decrease

What do you mean by this? Do you think manually registering the filter is too complex, or do you think we shouldn't pull in the slug crate at all and just implement our own filter? All it's doing is making some text lowercase, replacing spaces with dashes, and skipping symbols.

Another idea I had was to just move the function into example.rs, since that's the only place it is used.

@mockersf
Copy link
Member

That I prefer to keep depending on the default features, 3 seconds on the build time on a tool not on a critical path doesn't seem a big enough gain

@matiqo15 matiqo15 added A-Build-System Related to build systems or continuous integration C-Performance A change motivated by improving speed, memory usage or compile times labels Jan 14, 2024
@BD103
Copy link
Member Author

BD103 commented Jan 14, 2024

That I prefer to keep depending on the default features, 3 seconds on the build time on a tool not on a critical path doesn't seem a big enough gain

Ok. I'll revert the Tera commit but keep the other one.

@BD103
Copy link
Member Author

BD103 commented Jan 15, 2024

After looking at the most recent CI run, it appears that the Tera commit was the only thing providing any sort of time gains. (Compile times are back to 26.5 seconds.) I'm going to rename the PR and rewrite the description to make it just a version bump, because that's all it is at this point.

@BD103 BD103 changed the title Decrease compile time of build-template-pages tool Bump toml_edit in build-template-pages tool Jan 15, 2024
@mockersf mockersf added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jan 15, 2024
@mockersf
Copy link
Member

mockersf commented Jan 15, 2024

from #11357 it's also used in other places. would it makes sense to also remove the default features there? and could you update it everywhere?

@BD103
Copy link
Member Author

BD103 commented Jan 16, 2024

I bumped toml_edit everywhere it was explicitly depended on. I appears that they only need the parse feature, but CI will hopefully catch it if that's not the case.

$ cargo tree -i toml_edit
error: There are multiple `toml_edit` packages in your project, and the specification `toml_edit` is ambiguous.
Please re-run this command with one of the following specifications:
  toml_edit@0.19.15
  toml_edit@0.21.0

It appears that toml_edit 0.19 is being pulled in as well. It looks like an outdated version of proc-macro-crate is being used, which sources itself all the way back to bevy_audio. There's no much to be done about this except wait for dependencies to update themselves.

$ cargo tree --target all -i toml_edit@0.19.15
toml_edit v0.19.15
└── proc-macro-crate v1.3.1
    └── num_enum_derive v0.5.11 (proc-macro)
        └── num_enum v0.5.11
            └── ndk v0.7.0
                ├── cpal v0.15.2
                │   └── rodio v0.17.3
                │       └── bevy_audio v0.12.0 (/Users/bdeep/dev/bevy/bevy/crates/bevy_audio)
                │           └── bevy_internal v0.12.0 (/Users/bdeep/dev/bevy/bevy/crates/bevy_internal)
                │               └── bevy v0.12.0 (/Users/bdeep/dev/bevy/bevy)
                └── oboe v0.5.0
                    ├── bevy_audio v0.12.0 (/Users/bdeep/dev/bevy/bevy/crates/bevy_audio) (*)
                    └── cpal v0.15.2 (*)

@mockersf mockersf added this pull request to the merge queue Jan 16, 2024
Merged via the queue into bevyengine:main with commit 9f8db0d Jan 16, 2024
26 checks passed
@BD103 BD103 deleted the build-templated-pages-v2 branch January 16, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System Related to build systems or continuous integration C-Performance A change motivated by improving speed, memory usage or compile times S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants