Skip to content

Cache app paths#3544

Merged
freakboy3742 merged 2 commits into
beeware:mainfrom
HalfWhitt:cache_app_paths
Jun 9, 2025
Merged

Cache app paths#3544
freakboy3742 merged 2 commits into
beeware:mainfrom
HalfWhitt:cache_app_paths

Conversation

@HalfWhitt

Copy link
Copy Markdown
Member

Since there's no reason the locations of these paths should change, we might as well cache them.

I also did a little cleanup on the backends — mostly reducing the number of intermediary Path objects via f-strings, and bundling up the common logic in Windows into a cached property. I don't know of any particular reason why the underscore on Android's _context was doubled.

(This is right next to, but shouldn't conflict with, #3543.)

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@HalfWhitt HalfWhitt changed the title Cache app paths and streamline backend code Cache app paths Jun 9, 2025
@HalfWhitt HalfWhitt marked this pull request as ready for review June 9, 2025 03:46
@HalfWhitt HalfWhitt requested a review from freakboy3742 June 9, 2025 03:46

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 A small optimisation, but worth it - thanks!

@freakboy3742 freakboy3742 merged commit 44b910b into beeware:main Jun 9, 2025
52 checks passed
@HalfWhitt HalfWhitt deleted the cache_app_paths branch June 14, 2025 06:10
freakboy3742 pushed a commit to freakboy3742/toga that referenced this pull request Jun 14, 2025
@HalfWhitt HalfWhitt mentioned this pull request Jul 29, 2025
4 tasks
@cyphase cyphase mentioned this pull request Sep 12, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants