The situation
Shanashel runs one of Saudi Arabia's larger real estate listing platforms. Property search is the product: if it's slow, nothing else matters. When we joined the project, complex filter searches — city + neighborhood + price range + property type + geographic bounds — were taking 3+ seconds. That's above the threshold where users start leaving to try a competitor. The root cause was a combination of factors. Property location data was stored as text columns, making geographic queries impossible to index properly. Common filter combinations — the most frequently searched ones — weren't covered by composite indexes. Every search hit the database fresh, regardless of how many other users were searching identical parameters. We added MySQL spatial indexes on property location, enabling geographic bound queries to run in milliseconds rather than full table scans. Composite indexes were added on the top 12 filter combinations by search volume. For popular searches, Redis caching (5-minute TTL) means the second identical search returns from cache instantly. Media processing was a separate problem. Agents were stuck on the upload page until photo processing completed — sometimes 60-90 seconds for a large listing. We moved all media processing to background workers. The upload endpoint returns immediately with a processing status. Workers handle resize, compression, and format conversion asynchronously. When processing completes, the listing automatically transitions to live — no agent action required.
What had to change
Property search with multiple simultaneous filters took 3+ seconds on complex queries — above the abandonment threshold. Geographic queries had no spatial index, causing full table scans on location filtering. Agents uploading property photos were blocked on the page for 60–90 seconds until processing completed, then had to manually publish.
What we changed
Spatial indexes on location columns enabling geographic queries in milliseconds. Composite indexes on top 12 filter combinations by search volume. Redis cache (5-min TTL) for repeated popular searches. Background media processing workers: upload returns immediately, processing is async, listing auto-publishes on completion.
What the client gained
- 01 Spatial indexing — geographic search in milliseconds
- 02 Complex multi-filter search under 500ms consistently
- 03 Async media processing — agents never wait
- 04 Listings auto-publish when media is ready