deployer icon indicating copy to clipboard operation
deployer copied to clipboard

Tasks are a lot slower in v7

Open trsteel88 opened this issue 3 years ago • 5 comments

  • Deployer version: 7

Very very basic test but running deployer in v7 each tasks takes a lot longer to run. Is there anything that can be done to speed these up?

As an example I created the following task:

task('slow-test', function () {
    echo 'test';
});

The issue is compounded if you have a lot of tasks that need to execute.

v7 (>3 seconds):

trentsteel@TRS-MacBook-Pro website (develop) $  date && dep slow-test prod -vvv && date
Tue 18 Jan 2022 09:23:59 AEST
[prod] ssh: is master running?
[prod] ssh -O check -A -o ControlMaster=auto -o ControlPersist=60 -o ControlPath=******@****** echo
[prod] Master running (pid=13932)
task slow-test                                                                                                                                                                                                                                                                                                                   
[prod] /usr/local/Cellar/[email protected]/7.4.27/bin/php /usr/local/bin/dep worker --port 52178 --task slow-test --host prod --decorated -vvv
testdone on prod
done slow-test 200ms
Tue 18 Jan 2022 09:24:02 AEST
trentsteel@TRS-MacBook-Pro website (develop) $ 

v6 (less than 1 second):

trentsteel@TRS-MacBook-Pro website (master) $ date && dep slow-test prod -vvv && date
Tue 18 Jan 2022 09:23:26 AEST
➤ Executing task slow-test
test• done on [prod]
✔ Ok [0ms]
Tue 18 Jan 2022 09:23:26 AEST
trentsteel@TRS-MacBook-Pro website (master) $ 

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

trsteel88 avatar Jan 17 '22 23:01 trsteel88

Hmmm, this is really strange. I don't see such behavior. Will try to investigate. I can create a separate phar for debug tracing. Can you try to run it on your machine?

antonmedv avatar Jan 17 '22 23:01 antonmedv

Yeah no problem. Where do I get this phar?

trsteel88 avatar Jan 18 '22 10:01 trsteel88

Will create it later today.

antonmedv avatar Jan 18 '22 11:01 antonmedv

Anecdotal but I've found a ~3x performance improvement moving to v7, and that is with all the tasks, so maybe simple tasks are slower for some reason and the aggregate are faster

joelpittet avatar Aug 24 '22 16:08 joelpittet

On a Mac Server (using Homebrew Apache, PHP, MySQL, etc.), I've also noticed tasks are a lot slower... maybe the issue is MacOS related?

crifpeguy avatar Dec 05 '22 16:12 crifpeguy