-
Notifications
You must be signed in to change notification settings - Fork 21
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
Speed #1258
Conversation
Co-Authored-By: James Harrison <[email protected]>
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Codecov Report
@@ Coverage Diff @@
## master #1258 +/- ##
==========================================
- Coverage 94.16% 94.15% -0.02%
==========================================
Files 154 154
Lines 7478 7493 +15
Branches 698 702 +4
==========================================
+ Hits 7042 7055 +13
- Misses 330 331 +1
- Partials 106 107 +1
Continue to review full report at Codecov.
|
@@ -275,9 +275,6 @@ def _known_dates(self, table, schema): | |||
if x.isnumeric() | |||
) | |||
|
|||
@cached( | |||
TTLCache(1024, 120) | |||
) # Many dates to cache, two minutes seems reasonable to balance db access against speed boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for my understanding, what's the reason for removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to record the reasoning - this function is only called by available_dates
, which is itself cached. The periodic update function added to server.py skips the cache for available_dates
so it will always hit the db and create any table objects needed. That isn't guaranteed if this method is also cached.
…re-serve funcs get called
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One typo. Otherwise this looks good.
Co-Authored-By: James Harrison <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Towards #1256 but doesn't solve it.
I have:
Description
Several small tweaks which speed up creating query objects.
available_dates
when first connecting to FlowDB to pre-createTable
objectsavailable_dates
periodically as a background thread in the server to keep that freshTable
state machines if they're already complete__version__
inwrite_cache_metadata
- originally necessary to avoid a circular import, but not nowpg_notify
that isn't used