Why is `sed` command response slow during drone build?

When I need to modify the source code in the process of executing the build, the response of executing the sed command is very slow, and a command takes more than one minute. Is there any problem?

+ cp -rf /drone/src/** /DATA/code/
+ grep -rl '<AppenderRef' /DATA/code/ | xargs sed -i -r 's/(<AppenderRef.*\/>)/\1<AppenderRef ref="Console" \/>/g'
+ grep -rl 'ipAddressBinding=' /DATA/code/ | xargs sed -i '/^ipAddressBinding=/cipAddressBinding=0.0.0.0'

Under the hood, when Drone executes a pipeline step, it is effectively performing a docker run command, and executing your script as the container entrypoint. It looks something like this:

docker run <image> /bin/sh -c "cp -rf /drone/src/** /Data/code/\ngrep -rl .........."

As you can see from the above command, Drone is really just a very small wrapper around Docker. As such, Drone does not really have any influence over the performance of code executing inside a container; this is really determined by Docker and the amount of available resources on the host machine (iops, etc). Sorry, but since Drone does not have any influence over Docker performance, triaging Docker performance issues is outside of our area of expertise (although maybe someone else in the community with expertise in this area could chime in with ideas …).

sorry for the late reply, I found the problem, because there should be some differences between the grep command that comes with alpine linux and the normal version of grep? When I executed apk add grep to replace the grep in plugins/git, the grep process that took 38 minutes before was shortened to 2 minutes.