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

Create a lossy index of resource -> ClassPathElement mapping #42525

Merged
merged 6 commits into from
Aug 30, 2024

Commits on Aug 29, 2024

  1. Create a lossy index of resource -> ClassPathElement mapping

    The size of ClassLoaderState can be extremely problematic so the idea of
    this patch is to have a lossy index instead and try to find a good
    compromise between speed and memory usage.
    gsmet committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    a5c83d0 View commit details
    Browse the repository at this point in the history
  2. Make impl of ClassPathResourceIndex#getResourceKey() faster

    Previous implementation:
    Warmup Iteration   7: 63202.300 ops/ms
    Warmup Iteration   8: 64074.043 ops/ms
    Warmup Iteration   9: 63297.222 ops/ms
    Warmup Iteration  10: 63905.908 ops/ms
    
    New implementation:
    Warmup Iteration   6: 234089.005 ops/ms
    Warmup Iteration   7: 234372.742 ops/ms
    Warmup Iteration   8: 235722.737 ops/ms
    Warmup Iteration   9: 233265.148 ops/ms
    
    Also added a test to make sure we don't break it.
    gsmet committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    6f0e802 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ccb140f View commit details
    Browse the repository at this point in the history
  4. Honor parentFirst in QuarkusClassLoader#getElementsWithResource()

    For whatever reason, we weren't honoring parentFirst in this method
    which looks like an oversight and un undesirable behavior.
    gsmet committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    87543ec View commit details
    Browse the repository at this point in the history
  5. Remove a hack introduced for Liquibase that is no longer needed.

    With the new index, we don't need that anymore. I tested that the test
    introduced in this commit is still working fine
    (LiquibaseExtensionMigrateAtStartDirectoryChangeLogTest).
    
    Note that I fixed it as I forgot to consider the less priority elements
    there and I went for fixing it and then was wondering why this would be
    even useful.
    
    I also introduced a shortcut for empty resource.
    gsmet committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    32c605e View commit details
    Browse the repository at this point in the history
  6. Clarify the API around reloadable classes

    Make sure we use the proper vocabulary at each level and make sure the
    class loader API is consistently using reloadable instead of local.
    
    Per discussion with Alexey.
    gsmet committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    dfa1455 View commit details
    Browse the repository at this point in the history