[openstreetmap/openstreetmap-website] Cache expanded preferred_languages (PR #6344)

Tom Hughes notifications at github.com
Sat Aug 23 10:54:49 UTC 2025


tomhughes left a comment (openstreetmap/openstreetmap-website#6344)

So rubocop has thrown a fit on https://docs.rubocop.org/rubocop-rails/cops_rails.html#railshelperinstancevariable which is a bit of a problem.

I wonder if we could get most of the benefit by making `Locale::List#expand` and/or `Locale#candidates` memoize their result - the locale to tag name mapping would still have to be done each time but I suspect the locale expansion is the expensive part?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6344#issuecomment-3216705272
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6344/c3216705272 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250823/8c78cb95/attachment.htm>


More information about the rails-dev mailing list