Why do my tests take longer to run on CircleCI than locally?

Your build and tests may run more slowly on CircleCI than on a local developer machine. This article explains why you might see faster performance on your own laptop than in the CI environment and how to speed up tests on CircleCI.

Developers and programmers typically have powerful home machines with 4 or more powerful CPU cores and solid-state storage. A typical developer computer costs $1,000 - $4,000 and is replaced every few years with newest and greatest hardware.

To provide the same compute power on-demand for every build on CircleCI would cost a lot of money. To offer a cost effective service all standard builds run with 2 CPU cores and 4GB RAM.

How to speed up builds and tests

Parallel jobs

You can split your tests to run in parallel in multiple containers. More details here: https://circleci.com/docs/2.0/parallelism-faster-jobs/

Resource Class

For customers who require more power, we offer a premium feature that gives you the ability to select a resource_class on CircleCI . Please see our docs for more details:

Was this article helpful?
7 out of 17 found this helpful



Article is closed for comments.