Skip to content

0.2.1. Minor speed improventents

Choose a tag to compare

@martintrojer martintrojer released this 27 Dec 14:40
· 14 commits to main since this release

[0.2.1] - 2025-12-27

Removed

  • Unused Error Classes: Removed lib/errors.ts file containing unused error classes (ValidationError, NotFoundError, InternalServerError)
  • Unused Functions: Removed createButtonStyle() and disabledButtonStyle from button styles
  • Unused Validation: Removed validateEnvironment() function that only re-threw errors

Changed

  • Performance: Optimized saveDrawing() to reduce database operations from 3 to 1
  • Performance: Replaced loadDrawing() with fs.access() in PUT route for faster existence checks
  • Code Quality: Removed duplicate directory creation logic (consolidated into getDatabase())
  • Code Quality: Removed unnecessary host/port caching (env vars already cached by Node.js)
  • Code Quality: Removed redundant validation checks in saveDrawing()

Technical

  • Consolidated directory creation to single source (getDatabase())
  • Simplified PUT route to only load metadata when needed
  • Reduced redundant file system and database operations