Closed daveaspinall closed 7 years ago
Hi @daveaspinall, I'm owner of chromy. Could you tell me your chrome version? If you use canary version, please update it to latest version and try out again.
Hey @dotneet!
Sure, versions for both stable Chrome and Canary below:
Chrome: Version 59.0.3071.115 Canary: Version 61.0.3163.0
Just wanted to say I'm actually really enjoying Chromy (we use it on some other tests) and thanks for the brilliant work ๐
Update: Backstop is using Canary (which is apparently up to date) but it's still very slow
@daveaspinall Thanks! I found the cause of this problem.
@garris Please update chromy version. chromy ver.0.3.3 doesn't work with chrome61 (canary). 0.3.4 or later works.
@dotneet Thanks for the speedy solution!
@dotneet Updated!
@dotneet @garris: Updated the dependencies and tried the reference again but it's no faster I'm afraid ๐
npm view backstopjs@3.0.5 dependencies
{ casperjs: '^1.1.0-beta5',
chalk: '^1.1.3',
chromy: '^0.3.6',
'fs-extra': '^0.30.0',
junitwriter: '~0.3.1',
minimist: '^1.2.0',
'node-resemble-js': '^0.2.0',
'object-hash': '1.1.5',
open: '0.0.5',
os: '^0.1.1',
'p-map': '^1.1.1',
'phantomjs-prebuilt': '^2.1.7',
sharp: '^0.18.1',
sinon: '^1.17.7',
temp: '^0.8.3' }
@garris Thank you for updating.
@daveaspinall In my environment, I've confirmed that the problem that I found in BackstopJS 3.0.4 is fixed. But your problem seems to be different with the problem I found. As @garris mentioned in #479, the optimization for selector expansion might be the solution.
@daveaspinall Sorry to take so long to reply. Can you pull down this file and run the main backstop test in there? Then include the console output. At the end of the log you'll find a line that looks like this... COMMAND | Command test sucessfully executed in [35.681s]
That timestamp is what I am after. Thanks!
@daveaspinall almost forgot to add the repo... https://github.com/garris/backstop-feature-tests
^^^ please let me know the test time for this thanks!
@garris no problem! Appreciate the help from both of you on this.
Ran the test and it looks much faster (although still nowhere near the 15s of phantomjs)! Console output below:
COMMAND | Command `reference` sucessfully executed in [43.171s]
COMMAND | Command `openReport` sucessfully executed in [0.063s]
COMMAND | Command `report` sucessfully executed in [0.175s]
COMMAND | Command `test` sucessfully executed in [42.062s]
There must be an issue with my specific config. Going to copy the backstop.json over from these tests and see if that helps.
Update: copied the config over to my project and removed all but the isExpanded
scenario:
COMMAND | Command `reference` sucessfully executed in [443.649s]
I assume the same thing happens if you run test instead of reference? Also, how many selectors is backstop capturing.
There is an optimization planned where multiple selectors would only require much less rendering work -- this would probably make a very big difference in your case.
Ok. I think this is going to be important. I will refactor our isExpanded code path. It could be some time -- but it is the next thing on my list. Thanks for your patience.
@daveaspinall are you able to provide me access to the web app which causes the issue. I would like to benchmark the issue.
@garris apologies for the late reply!
There is an optimization planned where multiple selectors would only require much less rendering work -- this would probably make a very big difference in your case.
This may help, but I've also tried the reference on only 3 selectors and it still ran slow?
@daveaspinall are you able to provide me access to the web app which causes the issue. I would like to benchmark the issue.
Happy to set up my project for you to test! You may inadvertently find a problem with the setup. I'll send you a link shortly ๐
@garris test project setup for you:
https://github.com/daveaspinall/backstop-patternlab-test
Running backstop reference
on in this test on my machine takes [428.798s]
Great. Thank you!
It is looking like it may be a flaw with the expandedSelectors feature and not necessarily with the count of selectors. This issue is now my top priority.
Chromy has native support for this feature-- I will attempt to use that.
@garris as I've said before, I really appreciate you putting this issue high priority! ๐
@garris I've published chromy v0.4.0 that includes some performance improvements that can be used with chrome61 or later. And I confirmed that this improvements soften this problem.
NOTE: this version requires chrome60 or later. to get performance improvements using chrome canary is recommended.
In addition, new .screenshotSelector and .screenshotMultipleSelectors can get around the problem that be caused on very long page.
@dotneet that is excellent! Can't wait to try it out!
(I am still working to refactor the multiple selector code path)
@dotneet Just tested this.
Yes speed is much better... (Even before my refactor work) But I think there is a chromy regression -- images are double resolution.
previous version
Command test sucessfully executed in [19.099s]
0.4.0 version
Command test sucessfully executed in [12.424s]
Sorry, I've update chromy to v0.4.2 because of a regression bug.
@garris @dotneet great! I'll have a play tomorrow!
@dotneet this is a big improvement-- thank you! I hope to finish my refactor in the next day or so also.
UPDATE: This is almost fixed -- I just need to do some cleanup work before pushing a new version. Early indication is that speed way better!
Ok. New version. Hopefully this issue is sufficiently fixed...
old perf
Command test successfully executed in [19.099s]
new perf
Command test successfully executed in [11.762s]
tested on isExpanded
scenario in backstop test repo.
@daveaspinall Please retest to see if that addresses the issue. Thanks!
remember to npm install -g backstopjs@beta
shouldn't it be 'npm install backstop@beta' ? and can't we run using locally installed backstop( without -g)?
On Aug 1, 2017 4:01 PM, "Garris" notifications@github.com wrote:
@daveaspinall https://github.com/daveaspinall Please retest to see if that addresses the issue. Thanks!
remember to npm install -g backstopjs
โ You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/garris/BackstopJS/issues/480#issuecomment-319261412, or mute the thread https://github.com/notifications/unsubscribe-auth/AQUrIyoHttFEeY86cwdn4zu45GX8mYK0ks5sTqL-gaJpZM4OfGwV .
@kiran-redhat ๐ฎ Yes! Great catch! I fixed the line above.
And yes. Local install should still work fine.
Thank you for posting!
@garris Can confirm the reference task is much much faster!
Was:
COMMAND | Command `reference` sucessfully executed in [2143.046s]
Now:
COMMAND | Command `reference` sucessfully executed in [35.389s]
Seriously great work!! ๐๐ผ Going to mark this issue as complete ๐
Now to fix our issue with Chromy in my Docker container and our setup with be sweet
Ok. I think this is addressed for now.
Closing -- but please reopen if your problem is not resolved.
Cheers.
Hi Garris,
Creating a ticket in reference to #479.
Running
backstop reference
while using"engine": "chromy"
takes forever to finish (not actually had it complete yet), whereas phantomjs finishes in 15s.Backstop version:
BackstopJS v3.0.4
Node version:v7.6.0
Snapshot of the backstop.json:
Just an idea of how long it takes (there are ~54 components on the page):
Console output when using
"engine": "chromy"
:Console output when using
"engine": "phantomjs"
:Any ideas what could be slowing this down? Let me know if you need any more info and I'll post it up.
Thanks ๐ค