More benchmarks

This commit is contained in:
Lim Chee Aun 2024-09-09 16:36:42 +08:00
parent ec4916ab5c
commit 487e574765
3 changed files with 21 additions and 17 deletions

View file

@ -69,6 +69,7 @@ function Timeline({
const scrollableRef = useRef();
console.debug('RENDER Timeline', id, refresh);
__BENCHMARK.start(`timeline-${id}-load`);
const mediaFirst = useMemo(() => isMediaFirstInstance(), []);
@ -119,6 +120,7 @@ function Timeline({
setShowMore(false);
}
setUIState('default');
__BENCHMARK.end(`timeline-${id}-load`);
} catch (e) {
console.error(e);
setUIState('error');

34
src/locales/en.po generated
View file

@ -54,7 +54,7 @@ msgstr ""
#: src/components/nav-menu.jsx:193
#: src/components/shortcuts-settings.jsx:137
#: src/pages/following.jsx:20
#: src/pages/following.jsx:131
#: src/pages/following.jsx:133
msgid "Following"
msgstr ""
@ -527,7 +527,7 @@ msgstr ""
#: src/components/columns.jsx:19
#: src/components/nav-menu.jsx:184
#: src/components/shortcuts-settings.jsx:137
#: src/components/timeline.jsx:435
#: src/components/timeline.jsx:437
#: src/pages/catchup.jsx:876
#: src/pages/filters.jsx:89
#: src/pages/followed-hashtags.jsx:40
@ -606,7 +606,7 @@ msgstr ""
#: src/components/compose.jsx:1118
#: src/components/status.jsx:1962
#: src/components/timeline.jsx:982
#: src/components/timeline.jsx:984
msgid "Content warning"
msgstr ""
@ -856,13 +856,13 @@ msgstr ""
#: src/components/compose.jsx:3459
#: src/components/media-modal.jsx:387
#: src/components/timeline.jsx:887
#: src/components/timeline.jsx:889
msgid "Previous"
msgstr ""
#: src/components/compose.jsx:3477
#: src/components/media-modal.jsx:406
#: src/components/timeline.jsx:904
#: src/components/timeline.jsx:906
msgid "Next"
msgstr ""
@ -959,7 +959,7 @@ msgid "Accounts"
msgstr ""
#: src/components/generic-accounts.jsx:205
#: src/components/timeline.jsx:517
#: src/components/timeline.jsx:519
#: src/pages/list.jsx:293
#: src/pages/notifications.jsx:820
#: src/pages/search.jsx:454
@ -968,7 +968,7 @@ msgid "Show more…"
msgstr ""
#: src/components/generic-accounts.jsx:210
#: src/components/timeline.jsx:522
#: src/components/timeline.jsx:524
#: src/pages/search.jsx:459
msgid "The end."
msgstr ""
@ -1210,7 +1210,7 @@ msgstr ""
#: src/components/status.jsx:3413
#: src/components/status.jsx:3509
#: src/components/status.jsx:3587
#: src/components/timeline.jsx:971
#: src/components/timeline.jsx:973
#: src/pages/catchup.jsx:75
#: src/pages/catchup.jsx:1875
msgid "Filtered"
@ -2291,12 +2291,12 @@ msgstr ""
msgid "<0/> <1/> boosted"
msgstr ""
#: src/components/timeline.jsx:451
#: src/components/timeline.jsx:453
#: src/pages/settings.jsx:1065
msgid "New posts"
msgstr ""
#: src/components/timeline.jsx:552
#: src/components/timeline.jsx:554
#: src/pages/home.jsx:212
#: src/pages/notifications.jsx:796
#: src/pages/status.jsx:945
@ -2304,21 +2304,21 @@ msgstr ""
msgid "Try again"
msgstr ""
#: src/components/timeline.jsx:586
#: src/components/timeline.jsx:588
msgid "{0, plural, one {# Boost} other {# Boosts}}"
msgstr "{0, plural, one {# Boost} other {# Boosts}}"
#: src/components/timeline.jsx:591
#: src/components/timeline.jsx:593
msgid "Pinned posts"
msgstr "Pinned posts"
#: src/components/timeline.jsx:944
#: src/components/timeline.jsx:951
#: src/components/timeline.jsx:946
#: src/components/timeline.jsx:953
#: src/pages/catchup.jsx:1892
msgid "Thread"
msgstr ""
#: src/components/timeline.jsx:966
#: src/components/timeline.jsx:968
msgid "<0>Filtered</0>: <1>{0}</1>"
msgstr ""
@ -2889,11 +2889,11 @@ msgstr ""
msgid "No hashtags followed yet."
msgstr ""
#: src/pages/following.jsx:133
#: src/pages/following.jsx:135
msgid "Nothing to see here."
msgstr ""
#: src/pages/following.jsx:134
#: src/pages/following.jsx:136
#: src/pages/list.jsx:108
msgid "Unable to load posts."
msgstr ""

View file

@ -28,6 +28,7 @@ function Following({ title, path, id, ...props }) {
async function fetchHome(firstLoad) {
if (firstLoad || !homeIterator.current) {
__BENCHMARK.start('fetch-home-first');
homeIterator.current = masto.v1.timelines.home.list({ limit: LIMIT });
}
if (supportsPixelfed && homeIterator.current?.nextParams) {
@ -64,6 +65,7 @@ function Following({ title, path, id, ...props }) {
return bDate - aDate;
});
}
__BENCHMARK.end('fetch-home-first');
return {
...results,
value,