High-traffic Perfex CRM integrations often stall because every legacy REST call forces CodeIgniter 3 to load global hooks, language arrays, and monolithic helpers before returning a single JSON payload. Pairing PolyXGO Data Builder with IgniteCore dual-mode routing removes that overhead. In production deployments, shifting Data Builder endpoints to the isolated CodeIgniter 4 runtime cuts bootstrap latency, stabilizes concurrent webhook bursts, and eliminates memory spikes without altering database schemas.
Planning your own high-speed extension? Review the IgniteCore SDK dual-mode module architecture.
| Execution Path | CI3 Legacy Controller | Data Builder + IgniteCore (CI4) |
|---|---|---|
| Bootstrap Footprint | Loads all active CI3 modules and hooks | Loads only IgniteCore router and target service |
| Request Validation | Manual CI3 form_validation rules | Typed CI4 Filters and schema validation |
| Response Serialization | Echoed output buffers prone to notices | PSR-7 style JSON ResponseInterface |
| Error Isolation | Global PHP notices can corrupt JSON | Structured JSON error handler with HTTP status codes |
1. Why Data Builder Endpoints Slow Down Under CI3
When external ERP, WooCommerce, or mobile clients poll Perfex CRM every few seconds, CI3 executes app_init hooks across every installed module before your API controller even runs. A single slow third-party hook drags down every webhook and reporting request. Moving those routes into IgniteCore isolates execution, complementing the broader strategy in dual-mode Classic vs Next 1.0 engineering.
- Profile slow
/apior Data Builder webhook URLs to separate database query time from PHP framework bootstrap time. - Disable non-API UI hooks on headless JSON paths by routing
/ignite/*prefixes directly to the CI4 front controller. - Verify active third-party plugins using the IgniteCore Compatibility Scanner before enabling high-concurrency APIs.
2. Dual-Mode Dispatch Pattern in Data Builder
PolyXGO Data Builder keeps a clean CI3 fallback for standard Classic sites while automatically switching to its CI4 driver whenever IgniteCore is present. Both paths share identical endpoint schemas, token checks, and MySQL connection parameters so client integrations require zero URL changes.
- Map read-heavy list queries to indexed CI4 Query Builder streams with strict
limitand field projection controls. - Validate Bearer tokens and HMAC signatures inside a dedicated CI4
FilterInterfaceprior to controller instantiation. - Return deterministic
422and429JSON error envelopes instead of HTML error pages during rate-limit or payload failures.
Common Pitfalls and Quick Fixes
- Leading whitespace or PHP deprecation notices breaking JSON output: Route API calls through CI4
ResponseTraitwithdisplay_errorsoff in production so stray warnings never corrupt payloads. - Unbounded Data Builder queries timing out on large invoice tables: Enforce server-side cursor or offset pagination and restrict wildcard joins on unindexed custom fields.
- Stale
.htaccessrules bypassing the IgniteCore dispatcher: Place the IgniteCore rewrite rule block above Perfex’s defaultindex.phpcatch-all rule so CI4 routes match first.
Frequently Asked Questions
Do existing Data Builder API consumers need to change URLs for IgniteCore?
No. Data Builder preserves your configured endpoint paths, query parameters, and authentication headers across both execution modes. When IgniteCore is installed, the dual-mode router intercepts eligible endpoints transparently and serves faster CodeIgniter 4 responses without forcing external webhooks or apps to reconfigure.
How does IgniteCore handle Perfex custom fields in API queries?
IgniteCore’s shared database adapter connects directly to Perfex Classic’s tblcustomfields and tblcustomfieldsvalues tables using the active table prefix. Data Builder maps custom fields into typed JSON keys cleanly without duplicating database rows, breaking Classic admin form submissions, or requiring custom SQL triggers.
What happens to Data Builder APIs if IgniteCore is deactivated?
Because Data Builder is built as a dual-mode module, deactivating IgniteCore automatically routes incoming calls back through the standard CodeIgniter 3 module controller. API availability stays completely intact, though request latency reverts to standard CI3 bootstrap speeds until IgniteCore is re-enabled.
Can IgniteCore APIs run alongside existing Perfex REST modules?
Yes. IgniteCore isolates its routes under dedicated URL prefixes and PSR-4 namespace boundaries, so legacy Perfex REST plugins continue handling older integrations while Data Builder and new CI4 modules serve high-throughput JSON traffic concurrently without route collisions or class conflicts.

Leave a Reply