Skip to content

Conversation

@simu
Copy link
Member

@simu simu commented May 20, 2025

Checklist

  • The PR has a meaningful title. The title will be used to auto generate the changelog
  • PR contains a single logical change (to build a better changelog).
  • Update the documentation.
  • Update tests.
  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency, internal
    as they show up in the changelog
  • Link this PR to related PRs or issues.

TODO

  • Look at performance
  • Add more test coverage
  • Add Python test coverage which compares to Python reclass

@simu simu added the enhancement New feature or request label May 20, 2025
@simu simu marked this pull request as draft May 20, 2025 14:00
@github-actions

This comment was marked as outdated.

@simu simu force-pushed the feat/inventory-queries branch from 6467a45 to 99dad9e Compare May 20, 2025 14:04
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@simu simu force-pushed the feat/inventory-queries branch from ae043d7 to 011da57 Compare September 19, 2025 09:20
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@simu simu force-pushed the feat/inventory-queries branch from 6a0d9f1 to ed5dfd0 Compare September 19, 2025 09:51
@github-actions
Copy link

Benchmark for b794977

Click to view benchmark
Test Base PR %
Reclass::inventory() multi-threaded 1708.0±49.08µs 2.0±0.16ms +17.10%
Reclass::inventory() single-threaded 3.6±0.02ms 3.6±0.05ms 0.00%

simu and others added 19 commits September 19, 2025 15:26
buildinfo test can fail for a while after new rust version is released
and the rust version on the CI runners isn't updated yet.
This doesn't yet implement inventory queries in the reference parser and
the interpolation. Also, the interpolation order between parameters and
exports is currently a guess.
The approach of only parsing inventory queries after resolving
references probably won't work, since we don't know whether a query was
escaped or not at that point.

To do this properly, we'll have to extend / refactor the ref parser to
become a ref+invquery parser.
Test coverage isn't great yet, and some inventory query features are not
yet implemented.
Without this, `Exports::new()` has a very significant performance impact
even for inventories that don't use inventory queries at all.
@simu simu force-pushed the feat/inventory-queries branch from ed5dfd0 to c5989cb Compare September 19, 2025 14:49
@github-actions
Copy link

Benchmark for 7219478

Click to view benchmark
Test Base PR %
Reclass::inventory() multi-threaded 1746.1±127.34µs 2.0±0.15ms +14.54%
Reclass::inventory() single-threaded 3.5±0.02ms 3.7±0.22ms +5.71%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants