-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed as not planned
Labels
Description
Describe the bug
I've noticed a severe performance regression, first appearing in 3.0.4, 3.0.3 is not affected:
Before 3.0.4:
RUN v3.0.3 /Users/jacquesg/dev/projects/asterias/antaeus
✓ src/features/ng/admincompanymodal/admincompanymodal.test.tsx (17 tests) 7838ms
✓ admincompanymodal > name > min length
✓ admincompanymodal > name > max length 739ms
✓ admincompanymodal > address line 1 > min length
✓ admincompanymodal > address line 1 > max length 715ms
✓ admincompanymodal > address line 2 > min length
✓ admincompanymodal > address line 2 > max length 702ms
✓ admincompanymodal > street name > min length
✓ admincompanymodal > street name > max length 706ms
✓ admincompanymodal > locality > min length
✓ admincompanymodal > locality > max length 725ms
✓ admincompanymodal > county > min length
✓ admincompanymodal > county > max length 680ms
✓ admincompanymodal > region > min length
✓ admincompanymodal > region > max length 688ms
✓ admincompanymodal > postal code > min length
✓ admincompanymodal > postal code > max length 684ms
✓ admincompanymodal > submit 1222ms
Test Files 1 passed (1)
Tests 17 passed (17)
Start at 17:09:13
Duration 10.78s (transform 1.16s, setup 210ms, collect 2.34s, tests 7.84s, environment 150ms, prepare 34ms)
3.0.4 and 3.0.5:
RUN v3.0.5 /Users/jacquesg/dev/projects/asterias/antaeus
✓ src/features/ng/admincompanymodal/admincompanymodal.test.tsx (17 tests) 23507ms
✓ admincompanymodal > name > min length
✓ admincompanymodal > name > max length 879ms
✓ admincompanymodal > address line 1 > min length
✓ admincompanymodal > address line 1 > max length 1129ms
✓ admincompanymodal > address line 2 > min length
✓ admincompanymodal > address line 2 > max length 1410ms
✓ admincompanymodal > street name > min length
✓ admincompanymodal > street name > max length 1687ms
✓ admincompanymodal > locality > min length
✓ admincompanymodal > locality > max length 1991ms
✓ admincompanymodal > county > min length 329ms
✓ admincompanymodal > county > max length 2320ms
✓ admincompanymodal > region > min length 374ms
✓ admincompanymodal > region > max length 2663ms
✓ admincompanymodal > postal code > min length 412ms
✓ admincompanymodal > postal code > max length 3003ms
✓ admincompanymodal > submit 6202ms
Test Files 1 passed (1)
Tests 17 passed (17)
Start at 17:11:06
Duration 25.82s (transform 1.01s, setup 142ms, collect 1.82s, tests 23.51s, environment 90ms, prepare 30ms)
Reproduction
Quite hard to provide, this is what the submit
test case looks like (5x slower than before):
test('submit', async () => {
render(<AdminCompanyModal {...defaultProps} />);
const openButton = screen.getByRole('button', { name: 'Open' });
await userEvent.click(openButton);
const modal = await screen.findByRole('dialog');
expect(modal).toBeInTheDocument();
const nameInput = screen.getByRole('textbox', { name: 'name' });
await userEvent.type(nameInput, 'admin');
const addressLine1Input = screen.getByRole('textbox', { name: 'addressLine1' });
await userEvent.type(addressLine1Input, 'address line 1');
const addressLine2Input = screen.getByRole('textbox', { name: 'addressLine2' });
await userEvent.type(addressLine2Input, 'address line 2');
const streetNameInput = screen.getByRole('textbox', { name: 'streetName' });
await userEvent.type(streetNameInput, 'street name');
const localityInput = screen.getByRole('textbox', { name: 'locality' });
await userEvent.type(localityInput, 'locality');
const countyInput = screen.getByRole('textbox', { name: 'county' });
await userEvent.type(countyInput, 'county');
const regionInput = screen.getByRole('textbox', { name: 'region' });
await userEvent.type(regionInput, 'region');
const postalCodeInput = screen.getByRole('textbox', { name: 'postalCode' });
await userEvent.type(postalCodeInput, 'postal code');
const countrySelect = screen.getByRole('combobox', { name: 'countryCode' });
await userEvent.type(countrySelect, 'ire');
const option = await screen.findByText('Ireland');
await userEvent.click(option);
const groupSelect = screen.getByRole('combobox', { name: 'groupId' });
expect(groupSelect).toBeInTheDocument();
await userEvent.click(groupSelect);
await userEvent.click(screen.getByText('Group 2'));
const saveButton = screen.getByRole('button', { name: 'Save' });
await userEvent.click(saveButton);
expect(mockUpdateCompany).toHaveBeenCalledWith({
name: 'admin',
addressLine1: 'address line 1',
addressLine2: 'address line 2',
streetName: 'street name',
locality: 'locality',
county: 'county',
region: 'region',
postalCode: 'postal code',
groupId: '2',
countryCode: 'IE',
});
});
System Info
System:
OS: macOS 15.3.1
CPU: (14) arm64 Apple M3 Max
Memory: 3.28 GB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.13.0 - ~/.nvm/versions/node/v22.13.0/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.9.0 - ~/dev/projects/asterias/antaeus/node_modules/.bin/npm
pnpm: 9.15.5 - ~/.nvm/versions/node/v22.13.0/bin/pnpm
Browsers:
Brave Browser: 133.1.75.175
Chrome: 133.0.6943.98
Safari: 18.3
npmPackages:
@vitejs/plugin-react-swc: ^3.8.0 => 3.8.0
@vitest/coverage-v8: ^3.0.3 => 3.0.3
@vitest/ui: ^3.0.3 => 3.0.3
vite: ^6.1.0 => 6.1.0
vitest: ^3.0.5 => 3.0.5
vitest-canvas-mock: ^0.3.3 => 0.3.3
vitest-fail-on-console: ^0.7.1 => 0.7.1
vitest-preview: ^0.0.1 => 0.0.1
Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
aaadryyy