Comments (7)
I now see this is used in the expanded stats view, but still the data is returned for all child items in the browsing table. We shouldn't do this, and maybe it's worth to even simplify the data we display in the expanded view.
from zing.
When it comes to stats, I think I changed the code not to export unnecessary fields. Did you recalculate the stats?
from zing.
Yes, definitely — please consider this issue in the context of #62 and the get_stats
view, so definitely its exposure is way lower than regular browsing views.
Still, the main concerning point here is that there is too much information being cached. In browsing tables only the creation_time
timestamp is used. The rest of the fields are pretty much unused until the detailed view is expanded, hence my doubt about the real usefulness of keeping that much data in the cache.
If we still want to keep that information visible, we can likewise make things more compact by keeping only the mtime, the trimmed source and the unit id.
Since with the recent changes we are already required to run a server-wide refresh_stats
, I'm thinking that it makes sense to make any stats cache-related changes now and reduce to the minimum the amount of times we need to manually refresh stats.
from zing.
In the detailed stats view, we can definitely use only timestamps as well. So feel free to remove all datetime fields. Where specifically are they currently used?
from zing.
The rendering of last actions is already using timestamps in the detailed view, so the rest of datetimes are redundant.
Regarding the other fields, source
(trimmed) and unit_url
are used only, specifically in the expanded stats view. I was suggesting that in case we want to keep these, we could compact them even more to store source
and uid
only (then we can permalink to //server.tld/unit/<uid>/
.
So the cached information would be reduced to:
{
"lastupdated": {
"mtime": <int:timestamp>,
"source": <string:unit-source>,
"uid": <int:unit-id>,
}
}
or in case we decide not to display last updated information besides the date:
{
"lastupdated": <int:timestamp>
}
from zing.
As I understand, we're referring to the 'Last updated' column used in the browser table, and to the 'Updates' section in the expanded stats. The first one indeed requires only the timestamp and is heavily used, while the other seems to be less useful.
So if our only reason to cache extra data is to display this 'Updates' section, we can ditch it and store only the timestamp.
from zing.
Your understanding is correct, and totally agree with what you say (it's in line with what I was proposing above). I'll update #75 so that we cache timestamps only.
from zing.
Related Issues (20)
- In admin mode, filter out disabled projects from counters / translation views
- Avoid zero carry-overs
- Quality checks page requires help/_ttk_quality_checks.html
- Use Prettier for formatting frontend code
- Use Prettier for CSS formatting
- Upgrade Webpack
- Upgrade to latest React
- Make emojis work as placeables HOT 3
- Placeables should be inactive in read-only editor
- Editing a project fails source language validation
- Handle the case of an empty rendered string in Plurr preview HOT 5
- Support Plurr preview for simple {FOO}-style placeholders HOT 7
- Plurr preview pane to support empty parameters
- Visually identify LS Unicode symbol (U+2028) in the editor
- No module named 'syspath_override' HOT 2
- Incorrect number with the word count tracker HOT 3
- Issue building with python 3.7 HOT 4
- UI hangs indefinitely when attempt to translate a .po file with <= 10 entries HOT 5
- Exception in manage.py build_assets: 'gyp==0.1' distribution was not found
- UI hangs with spinner "Uncaught TypeError: this.unit is undefined" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zing.