cfb1489e01
* perf: batch DB operations in performance test setup to avoid CI timeout Replace ~5200 sequential DB inserts with batch createMany() operations in createHugeAttributesOfTypeSingleSelect. The test was timing out at 60s on 2-vCPU CI runners because the setup phase alone (creating 400 users, 800 memberships, 4000 attribute assignments one-by-one) exceeded the timeout before the actual logic under test even ran. Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com> * perf: optimize createAttributesScenario with batch DB operations Move batch DB operations (createMany) into the shared createAttributesScenario helper so all tests benefit, not just the performance test. Simplify createHugeAttributesOfTypeSingleSelect to delegate to the optimized helper. Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com> * Revert "perf: optimize createAttributesScenario with batch DB operations" This reverts commit c739edd3718796d61f6510ea3a9155065b69a1ce. * Revert "perf: batch DB operations in performance test setup to avoid CI timeout" This reverts commit ff6642ae49190c42dd8673a12ee11c8c971370b4. * perf: optimize createAttributesScenario with batch DB operations Replace sequential prisma.*.create() calls in the shared createAttributesScenario helper with batch createMany() calls, reducing ~5,200 sequential DB operations to ~10 batch operations. Simplify createHugeAttributesOfTypeSingleSelect to delegate to the optimized helper instead of duplicating batch logic. Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com> * fix: preserve deterministic user ordering in createAttributesScenario Map users by email after findMany to ensure the index-based attribute assignment matches the original userDataList order, since findMany does not guarantee return order. Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com> * revert: make test timeout back to 1 min * refactor: extract batch helpers createTestUsers, createTestMembershipsForUsers, createTestAttributeAssignments Organize batch DB operations from createAttributesScenario into reusable helper functions mirroring the existing single-record helpers. Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com> * cleanup: remove unused single-record helpers and JSDoc comments Remove createTestUser, createTestMemberships, createTestAttributeAssignment (now replaced by batch versions). Remove added comments. Co-Authored-By: romitgabani1 <romitgabani1.work@gmail.com> * chore --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>