-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Bug: Changing timezone to Asia/Krasnoyarsk causes page loads to be over 15 seconds #1588
Comments
So I've added rack-mini-profiler to my instance and here's some results: There is a lot of calls to Synth API: More context:
The offending code is most likely in When I call ExchangeRate.send(:fetch_rate_from_provider, from: "USD", to: "RUB", date: "2025-01-04") Also summaries show as 0 for accounts in another currencies until I change timezone and there is yet again Some ideas:
|
@4ndv thanks for the details here! This "off by 1" lookup in Synth is definitely something we'll need to address. That said, I'm not sure that it would be the root cause of the performance issue—all of these exchange rates are being synced in the background and should not affect HTTP requests. Can we narrow this down to something within the request/response cycle by chance? |
From a very brief look:
There is |
|
May have a bit of overlap to #1530 here Switching timezones shouldn't affect performance this much though. I agree that the currency conversion operations could be a source, but merely switching from one timezone to another shouldn't affect anything drastically. |
Switching timezones causes date to be "in the future", so every single call to |
@4ndv ahhh, I see what you mean now! That makes sense to me. |
Also I think this is important separate issue, so users with "+N" timezones wouldn't see 0es as a sum for foreign currency accounts |
Describe the bug
When changing timezone to
Asia/Krasnoyarsk
(UTC+7), every single page load now takes up to 45 seconds, with most of the time is spent in viewsWith
Etc/Utc
timezone:With
Asia/Krasnoyarsk
timezone:To Reproduce
Steps to reproduce the behavior:
Change timezone in Preferences to
Asia/Krasnoyarsk
,Expected behavior
Page loads quickly :)
What version of Maybe are you using?
Self-hosted with Docker, latest tag, latest image
What operating system and browser are you using?
EndeavourOS, latest Firefox
Screenshots / Recordings
-
Additional context
Settings section is not affected, I don't have lots of transactions, around 100-ish, across ~15 accounts
The text was updated successfully, but these errors were encountered: