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

Fixed PackageLocationCache calling kpsewhich when the cache contains a null value. #1716

Merged
merged 1 commit into from
Jan 5, 2021

Conversation

HannahSchellekens
Copy link
Member

Fixes #1424 variant: PackageLocationCache kept calling kpsewhich when the cache contains a null value.

  • Replaced the use of 'getOrPut' by custom code using 'containsKey'. getOrPut re-evaluates the defaultValue function when the value is null, which happens when the key is absent, or when there is a key with a null-value => unnecessary kpsewhich calls.
  • See https://youtrack.jetbrains.com/issue/KT-21392

… the cache contains a null value.

- Replaced the use of 'getOrPut' by custom code using 'containsKey'. getOrPut re-evaluates the defaultValue function when the value is null, which happens when the key is absent, or when there is a key with a null-value.
- See https://youtrack.jetbrains.com/issue/KT-21392
@HannahSchellekens HannahSchellekens added the bug Deficiencies in TeXiFy behaviour. label Jan 5, 2021
@HannahSchellekens HannahSchellekens added this to the b0.7.3 milestone Jan 5, 2021
@HannahSchellekens HannahSchellekens self-assigned this Jan 5, 2021
Copy link
Collaborator

@PHPirates PHPirates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That documentation is certainly misleading, I didn't know this. Many thanks for fixing!

@PHPirates PHPirates merged commit f378cb1 into master Jan 5, 2021
@PHPirates PHPirates deleted the 1424-cache-fix branch January 5, 2021 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Deficiencies in TeXiFy behaviour.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unnecessary expensive calls to kpsewhich / extremely lagged typing
2 participants