The solver we couldn't speed up
Created: Sept. 12, 2018 Updated: Sept. 29, 2026
Not every performance problem ends in success, and this one didn't.
We're building an online survey system. The survey itself is fast, respondents come in, answer the questions, the answers get saved, no problems there, the trouble comes earlier, when respondents are selected.
Several studies run at once and each has its own quotas, so many women, so many men, these age groups, these regions. One person may fit several studies but can only take part in one, so people have to be split between the samples in a way that satisfies every quota, and that takes a solver.
The solver isn't mine, someone else wrote it and the whole thing is more of an academic piece of work. The entire survey flow is fast, and the bottleneck is the solver itself.
We tried to do something about it, but in the end we didn't manage to make it significantly faster.
Machine-translated from Polish (original).