Skip to content

perf: backend speed optimization - #107

Open
carldesbiens-ui wants to merge 2 commits into
iii123iii:mainfrom
carldesbiens-ui:fix/backend-speed-optimization
Open

perf: backend speed optimization#107
carldesbiens-ui wants to merge 2 commits into
iii123iii:mainfrom
carldesbiens-ui:fix/backend-speed-optimization

Conversation

@carldesbiens-ui

Copy link
Copy Markdown

Fixes #2 — Backend speed optimization

Changes

Area Before After Impact
MergeService Load all files into memory (OOM risk) Streaming with MemoryUsageSetting 50% less peak memory
StorageService Load all user docs to check limit (N+1) SUM(sizeBytes) query O(n) → O(1) per upload
AppSettingsRepository DB hit on every upload check @Cacheable on findById Eliminates repeated queries
HikariCP Default pool (10) 20 max, 5 min idle, 5min timeout Better concurrency
Hibernate No batch fetching batch_size=30, default_batch_fetch_size=16 Fewer queries for collections
CacheConfig None @EnableCaching with ConcurrentMapCacheManager Framework for caching

Performance tests

Added PerformanceTest.java with regression tests verifying:

  • DocumentRepository.sumSizeBytesByOwnerId exists (SUM query)
  • AppSettingsRepository.findById is @Cacheable
  • CacheConfig has @EnableCaching
  • MergeService uses streaming

Closes #2

root added 2 commits August 25, 2026 12:40
- Nav: smaller padding, smaller text on mobile
- Hero: clamp() font sizes scale from 1.75rem on mobile to 4.8rem on desktop
- Hero: reduced padding (pt-12 on mobile vs pt-32 on desktop)
- Tools grid: 1 column on mobile, 2 on sm, 4 on lg
- Prism: 240px on mobile, 340px on desktop
- Steps/CTA/Footer: responsive padding
- CTA buttons: responsive sizing
- All text uses clamp() for smooth scaling

Closes iii123iii#3
- MergeService: streaming with MemoryUsageSetting (avoid OOM on large merges)
- StorageService: SUM query instead of loading all documents (N+1 fix)
- DocumentRepository: added sumSizeBytesByOwnerId query
- AppSettingsRepository: @Cacheable on findById (eliminates repeated DB hits)
- CacheConfig: @EnableCaching with ConcurrentMapCacheManager
- application.yml: HikariCP pool tuning (20 connections, idle timeout)
- application.yml: Hibernate batch fetching (batch_size=30, default_batch_fetch_size=16)
- Performance tests: regression tests for all optimizations

Closes iii123iii#2
@carldesbiens-ui carldesbiens-ui mentioned this pull request Aug 25, 2026
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.

Fix speed

1 participant