PHPackages                             lsmith/phpcr\_benchmark - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lsmith/phpcr\_benchmark

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lsmith/phpcr\_benchmark
=======================

PHPCR Benchmark

204PHP

Since Jul 10Pushed 11y ago2 watchersCompare

[ Source](https://github.com/lsmith77/phpcr_benchmark)[ Packagist](https://packagist.org/packages/lsmith/phpcr_benchmark)[ RSS](/packages/lsmith-phpcr-benchmark/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

PHPCR Benchmarking
==================

[](#phpcr-benchmarking)

The purpose of this repository is to compare different PHPCR implementations.

Create the database is necessary and make sure to initialize the DB structure when using Doctrine DBAL:

```
composer require jackalope/jackalope-doctrine-dbal:~1.1
./vendor/bin/jackalope jackalope:init:dbal

```

Alternatively when using Jackrabbit download and start the server:

```
composer require jackalope/jackalope-jackrabbit:~1.1
./vendor/bin/jackrabbit.sh

```

Also you can use MongoDB (not available at the moment):

```
composer require jackalope/jackalope-mongodb:dev-master

```

Copy the `cli-config.php.dist` to `cli-config.php` and adjust as needed. Finally run `php index.php` or `php index.php benchmark`.

It is possible to also configure the number of nodes to add per batch via `--count` and the number of repetitions via `--sections`.

For example: `php index.php benchmark --count 4 --sections 7` (note that no equal sign is supported)

Once the command has been run once, it can optionally be run one more time with `php index.php benchmark --append`to add one more "section" on top of the existing data to see how the performance is without having lots of previous inserts/gets before. This can of course be combined with the other parameters.

Furthermore you can force a table optimization (for Doctrine DBAL) before the test run via `--optimize` and disable query execution via `--disable-query`.

Finally it is possible to run some standard Jackalope commands via `./vendor/bin/jackalope`.

TODO
----

[](#todo)

- Make the stored nodes a bit more complex
- Investigate slow downs (especially insert performance, why SQLite is not using an index for subpath queries, slow downs in get by path)

Results
-------

[](#results)

See also the Travis-CI [![Build Status](https://camo.githubusercontent.com/7ffc5d43397c77a37a4b51e0b7e650888c52feea40a71fb8e92f0c0e260f8a8c/68747470733a2f2f7472617669732d63692e6f72672f70687063722f70687063725f62656e63686d61726b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phpcr/phpcr_benchmark).

### Jackalope Doctrine DBAL MySQL

[](#jackalope-doctrine-dbal-mysql)

```
lsmith@localhost phpcr_benchmark (master)$ php index.php benchmark --count 100 --sections 100
Inserting 100 nodes (total 100) took '279' ms.
Getting a node by path took '1' ms.
Searching a node by property took '14' ms.
Searching a node by property in a subpath took '5' ms.
Inserting 100 nodes (total 200) took '580' ms.
Getting a node by path took '2' ms.
Searching a node by property took '30' ms.
Searching a node by property in a subpath took '11' ms.
Inserting 100 nodes (total 300) took '871' ms.
Getting a node by path took '3' ms.
Searching a node by property took '42' ms.
Searching a node by property in a subpath took '18' ms.
Inserting 100 nodes (total 400) took '1188' ms.
Getting a node by path took '4' ms.
Searching a node by property took '56' ms.
Searching a node by property in a subpath took '26' ms.
Inserting 100 nodes (total 500) took '1503' ms.
Getting a node by path took '5' ms.
Searching a node by property took '72' ms.
Searching a node by property in a subpath took '33' ms.
Inserting 100 nodes (total 600) took '1824' ms.
Getting a node by path took '6' ms.
Searching a node by property took '86' ms.
Searching a node by property in a subpath took '38' ms.
Inserting 100 nodes (total 700) took '2147' ms.
Getting a node by path took '7' ms.
Searching a node by property took '101' ms.
Searching a node by property in a subpath took '45' ms.
Inserting 100 nodes (total 800) took '2753' ms.
Getting a node by path took '8' ms.
Searching a node by property took '117' ms.
Searching a node by property in a subpath took '50' ms.
Inserting 100 nodes (total 900) took '3057' ms.
Getting a node by path took '9' ms.
Searching a node by property took '135' ms.
Searching a node by property in a subpath took '55' ms.

...

Inserting 100 nodes (total 10000) took '31670' ms.
Getting a node by path took '130' ms.
Searching a node by property took '4955' ms.
Searching a node by property in a subpath took '551' ms.

```

```
lsmith@localhost phpcr_benchmark (master)$ php index.php benchmark --count 100 --sections 100 --append
Inserting 100 nodes (total 10100) took '303' ms.
Getting a node by path took '1' ms.
Searching a node by property took '113' ms.
Searching a node by property in a subpath took '6' ms.

```

### Jackalope Doctrine DBAL SQLite

[](#jackalope-doctrine-dbal-sqlite)

```
lsmith@localhost phpcr_benchmark (master)$ php index.php benchmark --count 100 --sections 100
Inserting 100 nodes (total 100) took '131' ms.
Getting a node by path took '1' ms.
Searching a node by property took '22' ms.
Searching a node by property in a subpath took '11' ms.
Inserting 100 nodes (total 200) took '262' ms.
Getting a node by path took '2' ms.
Searching a node by property took '47' ms.
Searching a node by property in a subpath took '28' ms.
Inserting 100 nodes (total 300) took '393' ms.
Getting a node by path took '3' ms.
Searching a node by property took '77' ms.
Searching a node by property in a subpath took '59' ms.
Inserting 100 nodes (total 400) took '521' ms.
Getting a node by path took '3' ms.
Searching a node by property took '117' ms.
Searching a node by property in a subpath took '94' ms.
Inserting 100 nodes (total 500) took '652' ms.
Getting a node by path took '3' ms.
Searching a node by property took '175' ms.
Searching a node by property in a subpath took '133' ms.
Inserting 100 nodes (total 600) took '787' ms.
Getting a node by path took '3' ms.
Searching a node by property took '226' ms.
Searching a node by property in a subpath took '180' ms.
Inserting 100 nodes (total 700) took '921' ms.
Getting a node by path took '4' ms.
Searching a node by property took '295' ms.
Searching a node by property in a subpath took '231' ms.
Inserting 100 nodes (total 800) took '1055' ms.
Getting a node by path took '5' ms.
Searching a node by property took '359' ms.
Searching a node by property in a subpath took '291' ms.
Inserting 100 nodes (total 900) took '1190' ms.
Getting a node by path took '6' ms.
Searching a node by property took '437' ms.
Searching a node by property in a subpath took '357' ms.

...

Inserting 100 nodes (total 10000) took '14616' ms.
Getting a node by path took '98' ms.
Searching a node by property took '40642' ms.
Searching a node by property in a subpath took '39664' ms.

```

```
lsmith@localhost phpcr_benchmark (master)$ php index.php benchmark --count 100 --sections 100 --append
Inserting 100 nodes (total 10100) took '140' ms.
Getting a node by path took '0' ms.
Searching a node by property took '763' ms.
Searching a node by property in a subpath took '735' ms.

```

### Jackalope Jackrabbit 2.x

[](#jackalope-jackrabbit-2x)

```
lsmith@localhost phpcr_benchmark (master)$ php index.php benchmark --count 100 --sections 100
Inserting 100 nodes (total 100) took '103' ms.
Getting a node by path took '2' ms.
Searching a node by property took '7' ms.
Searching a node by property in a subpath took '4' ms.
Inserting 100 nodes (total 200) took '223' ms.
Getting a node by path took '4' ms.
Searching a node by property took '22' ms.
Searching a node by property in a subpath took '10' ms.
Inserting 100 nodes (total 300) took '335' ms.
Getting a node by path took '7' ms.
Searching a node by property took '38' ms.
Searching a node by property in a subpath took '17' ms.
Inserting 100 nodes (total 400) took '459' ms.
Getting a node by path took '9' ms.
Searching a node by property took '48' ms.
Searching a node by property in a subpath took '22' ms.
Inserting 100 nodes (total 500) took '591' ms.
Getting a node by path took '11' ms.
Searching a node by property took '63' ms.
Searching a node by property in a subpath took '27' ms.
Inserting 100 nodes (total 600) took '699' ms.
Getting a node by path took '13' ms.
Searching a node by property took '78' ms.
Searching a node by property in a subpath took '34' ms.
Inserting 100 nodes (total 700) took '842' ms.
Getting a node by path took '16' ms.
Searching a node by property took '92' ms.
Searching a node by property in a subpath took '40' ms.
Inserting 100 nodes (total 800) took '947' ms.
Getting a node by path took '18' ms.
Searching a node by property took '106' ms.
Searching a node by property in a subpath took '46' ms.
Inserting 100 nodes (total 900) took '1053' ms.
Getting a node by path took '20' ms.
Searching a node by property took '120' ms.
Searching a node by property in a subpath took '55' ms.

...

Inserting 100 nodes (total 10000) took '7642' ms.
Getting a node by path took '199' ms.
Searching a node by property took '1506' ms.
Searching a node by property in a subpath took '492' ms.

```

```
lsmith@localhost phpcr_benchmark (master)$ php index.php benchmark --count 100 --sections 100 --append
Inserting 100 nodes (total 10100) took '68' ms.
Getting a node by path took '2' ms.
Searching a node by property took '21' ms.
Searching a node by property in a subpath took '16' ms.

```

### Jackalope MongoDB

[](#jackalope-mongodb)

Work in progress

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20873?v=4)[Luke Smith](/maintainers/lsmith)[@lsmith](https://github.com/lsmith)

---

Top Contributors

[![lsmith77](https://avatars.githubusercontent.com/u/300279?v=4)](https://github.com/lsmith77 "lsmith77 (37 commits)")[![cystbear](https://avatars.githubusercontent.com/u/412004?v=4)](https://github.com/cystbear "cystbear (1 commits)")[![joschi127](https://avatars.githubusercontent.com/u/1758468?v=4)](https://github.com/joschi127 "joschi127 (1 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (1 commits)")[![wjzijderveld](https://avatars.githubusercontent.com/u/450201?v=4)](https://github.com/wjzijderveld "wjzijderveld (1 commits)")

### Embed Badge

![Health badge](/badges/lsmith-phpcr-benchmark/health.svg)

```
[![Health](https://phpackages.com/badges/lsmith-phpcr-benchmark/health.svg)](https://phpackages.com/packages/lsmith-phpcr-benchmark)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
