-
Notifications
You must be signed in to change notification settings - Fork 73
Performance
Thomas Pollet edited this page Mar 8, 2026
·
3 revisions
- Applies to: Flask and FastAPI
- Best sources:
safrs/config.py,safrs/request.py - Related pages: Sorting, Pagination, and Sparse Fieldsets, Relationships and Includes
The most common SAFRS performance costs come from:
- large collections
- deep
include=...trees - high default page sizes
- expensive count operations
- keep pagination limits sane
- avoid very broad includes on large collections
- hide or disable relationships you do not need
- use sparse fieldsets to reduce payload size
- review
DEFAULT_PAGE_LIMIT,MAX_PAGE_LIMIT, andENABLE_RELATIONSHIPS
If you are testing with SQLite demo setups, remember that concurrency and write-heavy behavior can look different from production databases.
- Home
- Installation
- Quickstart (Flask)
- Quickstart (FastAPI)
- JSON:API Basics
- Relationships and Includes
- Filtering
- Sorting, Pagination, and Sparse Fieldsets
- Content Types and Errors
- Bulk Requests
- RPC / Custom Methods
- Customization
- Security and Access Control
- Stateless Endpoints / JABase
- Performance
- Examples
- Existing Databases (Legacy)
- PostGIS / GeoAlchemy2
- Docker / Deployment
- Troubleshooting
- Reference: SAFRSBase
- Reference: SAFRSBase Customization