Skip to content
Borek Bernard edited this page Feb 23, 2016 · 2 revisions

History of load test results (#588 comment):


Batch implementation (*.bat) on Windows seems to be not doable without spending plenty of time. I've implemented merge driver in bash and also in php. Both implementations have some pros and cons:

PHP implementation:

  • PHP implementation can be run on both Windows as well as Linux using same implementation.
  • dependant on path to php binary path, which is correctly stated only in PHP_BINARY available from php 5.4+ (see #726 )

Bash implementation

  • No need for external binary
  • Only on Linux

Load tests

Before sticking to one or another, I've made some load tests. The load test itself consists of this scenario:

  1. prepare X files, commit them to master
  2. switch to branch, update files and commit them
  3. switch back to master, update files and commit them
  4. merge branch into master

In the tables below, there are a couple of drivers tested:

  • No driver: just pure Git.
  • "Full implementation" driver: what we have in the repo, fully working driver resolving date conflicts
  • "Dummy implementation" driver: the driver still exists but just delegates to built-in Git driver without any custom logic. For example, this is how the dummy impl looks like in PHP:
<?php

$O = $argv[1];
$A = $argv[2];
$B = $argv[3];

$mergeCommand = 'git merge-file -L mine -L base -L theirs ' . $A . ' ' . $O . ' ' . $B;

exec($mergeCommand, $dummy, $mergeExitCode);
exit ($mergeExitCode);

Linux / Mac OS X

Linux / Mac OS X No driver PHP driver Bash driver
1000 files, full driver impl 0.29 s (?) 26.5 s 18.65 s
1000 files, dummy driver impl 0.29 s (?) 25.3 s 7.1 s
100 files, full driver impl 💥 3.2 s 2.4 s
100 files, dummy driver impl 💥 💥 💥

Windows

Windows No driver PHP driver Bash driver
1000 files, full driver impl 9.5 s 109.4 s
1000 files, dummy driver impl 9.5 s 108.9 s
100 files, full driver impl 2.6 s 12.1 s
100 files, dummy driver impl 2.6 s 11.5 s

From the results I assume that merging using custom merge driver has linear time complexity. php implementation seems to be remarkably slower only on Windows environment, so I think we can use it in VersionPress.

Clone this wiki locally