Skip to content

Improve manual coding performance#830

Open
jurei733 wants to merge 5 commits into
developfrom
improve-manual-coding-performance
Open

Improve manual coding performance#830
jurei733 wants to merge 5 commits into
developfrom
improve-manual-coding-performance

Conversation

@jurei733

Copy link
Copy Markdown
Collaborator

Summary

Refs #813

This PR improves the perceived and measured performance of the manual coding administration flows, especially for testergebnisse, Kodierübersicht, and manuelle Kodierung with auto-refresh enabled.

Changes include:

  • response-analysis summary/page/chunk caching to avoid repeatedly serving large cached payloads
  • stale-run and source-revision guards for background analysis jobs
  • in-flight dedupe and stale-cache protection for manual coding availability data
  • faster backend query filters for unit/variable pairs and applied-results counts
  • UI race guards so stale auto-refresh responses no longer overwrite the active tab/workspace state
  • split transient and priority error overlays so ordinary HTTP errors do not cover navigation, dialogs, or export progress
  • Cypress and repro scripts for slow-network, rapid-tab, and large-workspace performance checks

Root Cause

The slow feeling was not mainly caused by Angular rendering. The main sources were backend-side duplicate work and large cached response-analysis payloads being serialized and returned during cache hits. Rapid tab changes and auto-refresh could also start overlapping requests; old responses then risked updating current UI state. For stale paginator states, response-analysis could miss chunk caches and fall back toward heavier paths even though the summary was already available.

Validation

  • npx nx test backend --testFile=apps/backend/src/app/database/services/coding/coding-analysis.service.spec.ts --runInBand --skip-nx-cache
  • npx nx test backend --testFile=apps/backend/src/app/database/services/coding/coding-job.service.spec.ts --runInBand --skip-nx-cache
  • npx nx test backend --testFile=apps/backend/src/app/database/services/coding/coding-validation.service.spec.ts --runInBand --skip-nx-cache
  • npx nx test frontend --testFile=apps/frontend/src/app/shared/components/error-message-display/error-message-display.component.spec.ts --runInBand --skip-nx-cache
  • npx nx lint backend --skip-nx-cache
  • npx nx lint frontend --skip-nx-cache
  • Cypress UI smoke against http://localhost:4201, workspace 54, slow-4g profile, manual login: 4/4 passing

Notes

The issue is intentionally only referenced and not closed by this PR description. Local disk space was tight during the largest-scale repro work, so further tests beyond 5000 active test persons should be run on a machine with more free space.

@jurei733 jurei733 force-pushed the improve-manual-coding-performance branch from 7a23d48 to bc2b40c Compare June 29, 2026 22:42
@jurei733 jurei733 marked this pull request as ready for review June 29, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants