onfido-sdk-ui icon indicating copy to clipboard operation
onfido-sdk-ui copied to clipboard

Build time seem to have slowed down massively

Open gvinsot opened this issue 1 year ago • 4 comments

What was the expected behaviour?

Build time should be reasonable (max 3 minutes in my opinion)

What happened instead?

The build time seems to have increased a lot switching to version 9+ With version 8.3 it was taking fe minute, but since 9, it seems to be taking more than 20 minutes for this only package.

Version info:

  • Onfido SDK : "onfido-sdk-ui": "^9.0.0",
  • OS : Linux under Azure build pipeline

Integration configuration:

In package.json

"onfido-sdk-ui": "^9.0.0",

Steps to reproduce:

we run: react-app-rewired build

gvinsot avatar Oct 04 '22 11:10 gvinsot

I agree, I experience the same.

it's very annoying, on gitlab it takes me 21min to build....

Screenshot 2022-10-12 at 15 02 33

Kaynshin avatar Oct 06 '22 10:10 Kaynshin

I checked out 8.3.0, 9.0.0, and HEAD from scratch, then timed npm run build. They're identical: ~1 minute on my macOS laptop. On our internal GitLab (Linux), the build takes less than 3 minutes (and it's doing a bit more than building).

Do you have a rough idea where time is spent? Maybe a dependency is being rebuilt for some reason?

warrenseine avatar Oct 18 '22 09:10 warrenseine

Ok, I'm able to reproduce by integrating the SDK within a create-react-app project. Investigating.

warrenseine avatar Oct 18 '22 12:10 warrenseine

It found the culprit. It was caused by a version bump of one of our dependencies. The good news is that it is already fixed (and even faster than 8.3.0) in a soon-to-be-released version.

warrenseine avatar Oct 18 '22 13:10 warrenseine

Using React 18.2.0

Script: react-scripts build

Have gone from 80.49s. on 8.3.0

TO

on 9.1.4 1010 seconds

@warrenseine

jbird21 avatar Nov 01 '22 11:11 jbird21