KamoCRM

Bulk-load visitors and skip GeoLite lookup in list

PerformanceMediaService
Shipped
25 ஏப்ரல், 2026 அன்று 11:19 PM UTC
Author
Kamo
Commit
5c13630

The /api/support/tickets list endpoint was running, per page of 20 rows: - 20 **************** calls (N+1) - 20 calls into GeoLookupService.lookup, each of which is a range-scan against the GeoLite block table (millions of rows) plus a location fetch — ~40 extra queries on huge tables — even though the visitor record already has a stored country code. Fix: - getTickets bulk-fetches all visitors for the page in one query via **************** - toDTO is split: detail callers use the live-geo path; the list pass skips the GeoLite lookup entirely and just reads visitor.countryCode. This eliminates the dominant cost on the support-ticket page load.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing