ciena-blueplanet / ember-cli-visual-acceptance

MIT License
30 stars 12 forks source link

Synchronous XMLHttpRequest on the main thread #102

Closed ro0gr closed 5 years ago

ro0gr commented 7 years ago

Currently ember-cli-visual-acceptance makes lots of sync ajax requests. I believe it may be a root cause of lagging perfomance on my local machine while running tests with several screenshots.

Also Chrome dev tools warns that this behaviour is deprecated and is going to be removed: sync-ajax

What do you think about replacing it with async requests?

EWhite613 commented 7 years ago

Sorry somehow missed this, school and what not. Ya for sure async request would be awesome. If I get some free time during I can do it. If you want to tackle it feel free.

EWhite613 commented 7 years ago

I think my reasoning for sync was that I didn't want to miss the capture. But we could just require that the done callback is used or usuage is returning the capture promise.

ro0gr commented 7 years ago

As I can see(on my phone) _capture returns a promise already. Not sure how we can miss a capture as long as qunit and mocha both support promises as a test return value

EWhite613 commented 7 years ago

Ya, agreed. Async should be fine and provide a nice performance boost