Skip to content

Optimize Firebase query performance#48

Merged
fkischewski99 merged 7 commits intomainfrom
fix/performance-optimizations
Mar 26, 2026
Merged

Optimize Firebase query performance#48
fkischewski99 merged 7 commits intomainfrom
fix/performance-optimizations

Conversation

@fkischewski99
Copy link
Copy Markdown
Owner

Summary

  • Participant loading: Use server-side Firestore .where filtering instead of downloading all participants and filtering client-side. Also eliminates N redundant getCustomUserGroup() Firestore reads (each call was a separate network request).
  • Shopping list ingredients: Batch-fetch all recipe ingredients with getBatchIngredients() in 10er-chunks instead of individual document reads per ingredient (~192 calls → ~20 for a typical event).
  • PDF export: Pass the already-calculated MultiDayShoppingList from ViewModel state to createPdf() instead of recalculating everything from scratch.
  • Cleanup: Remove unused SharePdf action (no longer accessible from UI). Use Dispatchers.IO for network I/O in AllParticipantsViewModel.

Test plan

  • Open "Teilnehmende verwalten" — participant list should load noticeably faster
  • Create/view shopping list — should load faster
  • Export shopping list as PDF — should be significantly faster (no recalculation)
  • Add/remove participants — live updates should still work
  • Add a meal, then regenerate shopping list — new meal should be included
  • Export recipe plan PDF from main screen — should still work

🤖 Generated with Claude Code

fkischewski99 and others added 7 commits March 26, 2026 20:31
…and PDF export

- Use server-side Firestore filtering for getAllParticipantsOfStamm() instead of
  client-side filtering (eliminates N redundant getCustomUserGroup() reads)
- Batch-fetch recipe ingredients using getBatchIngredients() instead of individual
  document reads (reduces ~192 calls to ~20 for typical events)
- Pass already-calculated shopping list to PDF export instead of recalculating
- Remove unused SharePdf action from HandleEditEvent (no longer accessible)
- Use Dispatchers.IO for network operations in AllParticipantsViewModel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…alizer

Support alternate spellings (fruktosearm, Laktose, Gluten) and gracefully
handle blank strings from Firebase data.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace default Android/iOS/Desktop icons with new scout camp logo.
Update iOS launch screen background to dark green and add *.jks to .gitignore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covers Firebase Auth/Firestore, participant data (health data under Art. 9 GDPR),
CSV import, third-country transfers, update checks, and app permissions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace all Android launcher icons (ic_launcher, ic_launcher_foreground,
ic_launcher_round) across all densities with the new green campfire logo.
Remove old Android robot vector foreground that was overriding the icon on API 24+.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace RecipeFormDialog with RecipeFormScreen for full-screen navigation.
Add recipe form route to navigation graph.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fkischewski99 fkischewski99 merged commit 375f8a4 into main Mar 26, 2026
1 check passed
@fkischewski99 fkischewski99 deleted the fix/performance-optimizations branch March 26, 2026 20:37
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.

1 participant