Skip to content

test: improve language service tests performance#30585

Closed
alan-agius4 wants to merge 1 commit intoangular:masterfrom
alan-agius4:perf-language-service-specs
Closed

test: improve language service tests performance#30585
alan-agius4 wants to merge 1 commit intoangular:masterfrom
alan-agius4:perf-language-service-specs

Conversation

@alan-agius4
Copy link
Contributor

With this change we reduce the amount of IO operations. This is especially a huge factor in windows since IO ops are slower.

With this change mainly we cache existsSync and readFileSync calls

Here's the results

Before

//packages/language-service/test:test
INFO: Elapsed time: 258.755s, Critical Path: 253.91s

After

//packages/language-service/test:test
INFO: Elapsed time: 66.403s, Critical Path: 63.13s

@alan-agius4 alan-agius4 requested a review from a team May 21, 2019 08:56
@alan-agius4 alan-agius4 added area: build & ci Related the build and CI infrastructure of the project area: language-service Issues related to Angular's VS Code language service hotlist: windows-support target: major This PR is targeted for the next major release labels May 21, 2019
@ngbot ngbot bot added this to the needsTriage milestone May 21, 2019
@alan-agius4
Copy link
Contributor Author

On codefresh CI

Before

//packages/language-service/test:test                                    PASSED in 297.9s 

With the change

//packages/language-service/test:test                                    PASSED in 111.6s 

That shaves off approx 3mins

//cc @filipesilva

With this change we reduce the amount of IO operations. This is especially a huge factor in windows since IO ops are slower.

With this change mainly we cache `existsSync` and `readFileSync` calls

Here's the results

Before
```
//packages/language-service/test:test
INFO: Elapsed time: 258.755s, Critical Path: 253.91s
```

After
```
//packages/language-service/test:test
INFO: Elapsed time: 66.403s, Critical Path: 63.13s
```
@alan-agius4 alan-agius4 added the action: merge The PR is ready for merge by the caretaker label May 22, 2019
@IgorMinar
Copy link
Contributor

Is it right that this is master only PR?

@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release and removed target: major This PR is targeted for the next major release labels May 24, 2019
@alan-agius4
Copy link
Contributor Author

@IgorMinar, no it’s should be master & patch.

Thanks for highlighting it.

@matsko matsko added target: major This PR is targeted for the next major release and removed target: patch This PR is targeted for the next patch release labels May 24, 2019
pull bot pushed a commit to Pandinosaurus/angular that referenced this pull request May 24, 2019
With this change we reduce the amount of IO operations. This is especially a huge factor in windows since IO ops are slower.

With this change mainly we cache `existsSync` and `readFileSync` calls

Here's the results

Before
```
//packages/language-service/test:test
INFO: Elapsed time: 258.755s, Critical Path: 253.91s
```

After
```
//packages/language-service/test:test
INFO: Elapsed time: 66.403s, Critical Path: 63.13s
```

PR Close angular#30585
@matsko
Copy link
Contributor

matsko commented May 24, 2019

@alan-agius4 @IgorMinar I merged this only to master ... let me know if this was the correct thing to do.

@matsko matsko closed this May 24, 2019
@alan-agius4
Copy link
Contributor Author

@matsko, can you please merge it to patch as well? Or it doesn’t apply cleanly?

@matsko
Copy link
Contributor

matsko commented May 25, 2019

It doesn't apply cleanly. Can you create another PR based on the patch branch and I will merge it in?

@matsko
Copy link
Contributor

matsko commented May 25, 2019

Patch being 8.x

@alan-agius4
Copy link
Contributor Author

@matsko, yes, will do that on Monday and I’ll ping you, as I away for the weekend.

@alan-agius4
Copy link
Contributor Author

@matsko, here's the patch version #30683

@alan-agius4 alan-agius4 deleted the perf-language-service-specs branch May 27, 2019 07:20
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project area: language-service Issues related to Angular's VS Code language service cla: yes target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants