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

Improve performance of ImportResolver #435

Open
reckart opened this issue Jan 20, 2025 · 0 comments
Open

Improve performance of ImportResolver #435

reckart opened this issue Jan 20, 2025 · 0 comments
Assignees
Labels
⚙️ Refactoring Improvement for development or maintainability
Milestone

Comments

@reckart
Copy link
Member

reckart commented Jan 20, 2025

Describe the refactoring action
Introduce a cache in the ImportResolver to avoid repeatedly looking up the absolute URL of an import.

Expected benefit
Depending on the environment, looking up the absolute URL can be slow and it seems to happen a lot for certain modular type system designs.

@reckart reckart added the ⚙️ Refactoring Improvement for development or maintainability label Jan 20, 2025
@reckart reckart added this to the 3.6.1 milestone Jan 20, 2025
@reckart reckart self-assigned this Jan 20, 2025
reckart added a commit that referenced this issue Jan 20, 2025
- Introduce thread-local cache in ImportResolver
- Fix leak between multi-threading tests
- Bit of cleaning up
reckart added a commit that referenced this issue Jan 22, 2025
- Try short-cutting the check if a URL target exists by handling file URLs directly via the file system and not opening a stream
reckart added a commit that referenced this issue Jan 22, 2025
- Try reducing the cases where unnecessary URLs are created because they can be expensive to create
- Improve some documentation
- Minor cleaning up
reckart added a commit that referenced this issue Jan 22, 2025
- Introduce a cache for services loaded per classloader to avoid expensive repeated loading of services via a ServiceLoader
reckart added a commit that referenced this issue Jan 22, 2025
- Introduce a cache for services loaded per classloader to avoid expensive repeated loading of services via a ServiceLoader
reckart added a commit that referenced this issue Jan 22, 2025
- Added method to clear the service cache
reckart added a commit that referenced this issue Jan 23, 2025
…into refactoring/430-Resolving-type-system-imports-through-SPIs-slows-things-down-too-much

* refactoring/435-Improve-performance-of-ImportResolver:
  Issue #435: Improve performance of ImportResolver
  Issue #435: Improve performance of ImportResolver
  Issue #435: Improve performance of ImportResolver
  Issue #435: Improve performance of ImportResolver
  Issue #435: Improve performance of ImportResolver
  Issue #435: Improve performance of ImportResolver

% Conflicts:
%	uimaj-core/src/main/java/org/apache/uima/resource/impl/RelativePathResolver_impl.java
reckart added a commit that referenced this issue Jan 23, 2025
- Added build action from main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Refactoring Improvement for development or maintainability
Projects
None yet
Development

No branches or pull requests

1 participant