mirror of
https://github.com/status-im/status-app.git
synced 2026-08-27 07:01:14 +00:00
* perf(chat): lazy, async member loading for user list and mention suggestions The members panel builds on first show only (latched), asynchronously behind MembersListSkeleton — it must never delay a chat switch. Once built, UserListPanel binds its users model only while the right panel is actually visible, and it adopts the shared MembersPanelHeader introduced with the skeletons. The mention suggestions adaptor stays detached from the members model until the first mention entry (short wire delay, loading skeleton in the suggestion box meanwhile; the latch drops on usersModel swap so chat switches never pay for sorting the members model). Together these were ~1.5s of the chat-switch freeze on large communities. * fixup! perf(chat): lazy, async member loading for user list and mention suggestions The members panel is shared across the section's chats, so once built it stayed visible through a chat switch: it showed the previous chat's members while sorting the incoming model on the switch frame. A latch drops it back behind MembersListSkeleton on every active-chat change and re-arms on a short delay, the same shape as the mention suggestions wiring. rightPanelReady now follows the loader it was named after. * fixup! perf(chat): lazy, async member loading for user list and mention suggestions Keying the latch on the active chat id dropped it on every switch, but a community channel without permissions hands the view the *same* members model object — so the panel was torn down and fully re-sorted for nothing, on the dominant path. Key it on the model identity instead: same object, same members, no work; different object, the protection the latch is for. rightPanelReady must fold the latch in, or the chrome retires its members skeleton exactly while the panel is showing one. membersWireDelay moves into `d` (tests reach it through the view's private object), and the panel's own skeleton is released like the others rather than kept alive and hidden. The switch test now targets the permissioned channel, whose model really differs, and a new test pins that the shared-model switch costs nothing. * fixup! perf(chat): lazy, async member loading for user list and mention suggestions Extract the fully-wired CommunityChatLoader test harness (mock stack, loader wiring, type-prefix finders) into a shared helpers component. The members-skeleton suite is the first consumer; the community section suite above adopts it at the next stack rebase, removing ~90 duplicated lines per suite. * chore: update translations * perf: sorted users_model and PR comments * perf: Avoid swapping skeleton for the real view when swipeview animations are running * chore: update translations * chore: update translations
74 lines
3.0 KiB
Makefile
74 lines
3.0 KiB
Makefile
# Nim host tests and benchmarks (test/nim/). Included from the main Makefile;
|
|
# relies on NIM_PARAMS, STATUSQ_LIB_PATH, STATUSGO*, QRCODEGEN and the Qt
|
|
# variables being defined at the include site.
|
|
#
|
|
# Naming convention: benchmarks end in `_bench.nim`; everything else is a test.
|
|
|
|
NIM_BENCH_FILES := $(wildcard test/nim/*_bench.nim)
|
|
NIM_TEST_FILES := $(filter-out $(NIM_BENCH_FILES),$(wildcard test/nim/*.nim))
|
|
NIM_TESTS := $(addprefix nim-test-run/,$(NIM_TEST_FILES))
|
|
NIM_BENCHES := $(addprefix nim-test-run/,$(NIM_BENCH_FILES))
|
|
|
|
# These stand up real StatusQ machinery — signal_handler /
|
|
# statusq_invoke_method_queued, ModelQuery/ModelUtils, SFPM proxy chains, or
|
|
# full modal QML trees in an offscreen engine — so they link libStatusQ and
|
|
# need it built first.
|
|
NIM_TESTS_LINK_STATUSQ := \
|
|
asset_proxy_chain_bench \
|
|
collectibles_selector_bench \
|
|
collectibles_selector_model_bench \
|
|
send_handler_adaptors_bench \
|
|
send_handler_lookup_bench \
|
|
send_modal_instantiation_bench \
|
|
services_pause_bridge_test \
|
|
signal_handler_test \
|
|
swap_key_harvest_bench \
|
|
swap_modal_instantiation_bench \
|
|
typed_completion_test \
|
|
url_scheme_event_test
|
|
|
|
NIM_STATUSQ_TARGETS := $(patsubst %,nim-test-run/test/nim/%.nim,$(NIM_TESTS_LINK_STATUSQ))
|
|
$(NIM_STATUSQ_TARGETS): NIM_PARAMS += --passL:"-L$(STATUSQ_LIB_PATH)" --passL:"-lStatusQ"
|
|
$(NIM_STATUSQ_TARGETS): | statusq
|
|
|
|
# Model-spy tests call inspection accessors gated behind
|
|
# `when defined(testing) or defined(QT_MODEL_SPY)` or assert on the granular
|
|
# signals model_sync records only under QT_MODEL_SPY. The define is applied
|
|
# per-file, NOT globally
|
|
NIM_TESTS_MODEL_SPY := \
|
|
assets_adaptor_model_test \
|
|
collectibles_selector_model_test \
|
|
grouped_account_assets_model_test \
|
|
member_model_test \
|
|
model_sync_move_test \
|
|
model_sync_unified_test \
|
|
token_groups_model_test \
|
|
token_lists_model_test \
|
|
token_selector_model_bench \
|
|
token_selector_model_test \
|
|
token_selector_producer_view_test
|
|
|
|
$(patsubst %,nim-test-run/test/nim/%.nim,$(NIM_TESTS_MODEL_SPY)): NIM_PARAMS += -d:QT_MODEL_SPY
|
|
|
|
ifneq ($(mkspecs),win32)
|
|
nim-test-run/%: NIM_PARAMS += --passL:"$(QT_SEAQT_EXTRA_LIBS)"
|
|
endif
|
|
|
|
nim-test-run/%: | qt-pkgconfig $(STATUSGO) $(QRCODEGEN)
|
|
LD_LIBRARY_PATH="$(QT_LIBDIR)":"$(NIMSDS_LIBDIR)":"$(STATUSGO_LIBDIR)":"$(EXTRA_LIBS_PATH)":"$(LD_LIBRARY_PATH)" $(ENV_SCRIPT) \
|
|
nim c $(NIM_PARAMS) $(NIM_EXTRA_PARAMS) --mm:orc --passL:"-L$(STATUSGO_LIBDIR)" --passL:"-lstatus" --passL:"$(QRCODEGEN)" -r $(subst nim-test-run/,,$@)
|
|
|
|
tests-nim: $(NIM_TESTS)
|
|
|
|
benches-nim: $(NIM_BENCHES)
|
|
|
|
# CI target (ci/Jenkinsfile.tests-nim). Deliberately runs the benchmarks too:
|
|
# their setup code and structural GREEN-gate assertions only stay honest if CI
|
|
# keeps building and executing them. Wall-clock perf gates flake on the shared
|
|
# executors, so BENCH_ASSERTS=0 downgrades them to report-only, and BENCH_QUICK=1
|
|
# trims the size sweeps to the assert-relevant sizes (see
|
|
# test/nim/benchmarks/perf_gate.nim).
|
|
tests-nim-linux: export BENCH_ASSERTS := 0
|
|
tests-nim-linux: export BENCH_QUICK := 1
|
|
tests-nim-linux: tests-nim benches-nim
|