axe-core-gems icon indicating copy to clipboard operation
axe-core-gems copied to clipboard

fix: add `Lazy-load Axe::API::Run` to save boot time

Open cbliard opened this issue 7 months ago • 3 comments

It saves 95% of load time when doing require "axe-rspec". On my tests, I went from 135ms to 8ms.

The time is actually mostly spent loading the virtus library. Deferring the loading of Axe::API::Run until needed does in turn defer the loading of virtus library.

This is to improve the time is takes to run a single rspec file which does not involve any a11y, but yet requires axe-rspec in the spec_helper.

No QA required.

cbliard avatar Jul 08 '24 10:07 cbliard