Textpattern CMS support forum

You are not logged in. Register | Login | Help

#91 2015-05-12 22:20:42

etc
Developer
Registered: 2010-11-11
Posts: 3,145
Website

Re: Making plugins first-class citizens

ruud wrote #290694:

Let’s do some insane benchmarks. I’ve used wet_lorem_ipsum to generate 10.000 articles. I’m using your real world example to generate a page.

Wow, it’s almost twice faster! 10.000 is probably not so common, but in my tests I get 20-30% acceleration starting with 50 articles. This should suffice to avoid 4.6 slowdown.

Things one might conclude are:

  • adding short tag support doesn’t have to cost anything in performance.
  • splat optimisations don’t seem to help.
  • the various small optimisations may be more interesting to apply than rewriting the parser.
  • this is definitely not a realistic real-world test.
  • i need a more reliable (less fluctuating) way to benchmark.

Amazing result, but you don’t mean that commit d970063 alone gives these figures? I haven’t noticed much effect of splat optimization neither, but your real life example seems to be for it. Great work, whatever!


etc_[ query | search | pagination | date | tree | cache ]

Offline

#92 2015-05-12 22:47:37

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Making plugins first-class citizens

The commits I listed are cumulative, so each one builds on the one before. Ideally you should see the runtimes go down with each commit shown (apart from short tags which wasn’t a speed optimisation).

Offline

#93 2015-05-15 17:46:35

etc
Developer
Registered: 2010-11-11
Posts: 3,145
Website

Re: Making plugins first-class citizens

Re splat, for 4 attributes sha1 is ~10 times faster than preg_match_all, and md5 is even faster. But the regex pattern is very simple, so preg_match_all takes only 10-5s and the difference is unnoticeable. But as the number of attributes grows, the runtime of preg_match_all seems to grow faster than sha1 (~20x slower for 8 attributes). So, I would optimize splat nevertheless.


etc_[ query | search | pagination | date | tree | cache ]

Offline

#94 2015-06-19 11:14:57

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,188
Website

Re: Making plugins first-class citizens

Did anything happen with this?

Offline

#95 2015-06-20 10:32:54

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,193
Website

Re: Making plugins first-class citizens

philwareham wrote #291691:

Did anything happen with this?

I don’t know. Seems to be a lot of back and forth about trivial values, getting the last word in, and such. ;)


The text persuades, the *notes prove。

Offline

#96 2015-06-23 10:48:29

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,267
Website

Re: Making plugins first-class citizens

philwareham wrote #291691:

Did anything happen with this?

There was a pull request which wasn’t ready to be merged. Then: Crickets.

Offline

#97 2015-06-23 15:09:44

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Making plugins first-class citizens

From the Github comments:

Perhaps best to first decide which parts you want. I can create a new, clean branch if necessary or perhaps it is possible to cherry pick commits

Where you = devs :)

Offline

#98 2015-06-24 14:01:00

hcgtv
Plugin Author
From: Miami, Florida
Registered: 2005-11-29
Posts: 2,634
Website

Re: Making plugins first-class citizens

ruud wrote #290611:

Looks like 4.6-dev somehow got a lot slower compared to 4.5.7.

Yes, I can confirm your findings.

http://jessie/
VirtualBox: Intel Dual Core (3.0GHz), 2GB of ram
Debian GNU/Linux 8.1 “jessie” – Apache 2.4.10 – MySQL 5.5.43 – PHP 5.6.9

Textpattern 4.5.7:

bert@jessie:~$ ab -n 100 -c 10 http://jessie/textpattern/
Document Path:          /textpattern/
Document Length:        9797 bytes
Concurrency Level:      10
Time taken for tests:   1.795 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      996700 bytes
HTML transferred:       979700 bytes
Requests per second:    55.72 [#/sec] (mean)
Time per request:       179.478 [ms] (mean)
Time per request:       17.948 [ms] (mean, across all concurrent requests)
Transfer rate:          542.32 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    3  11.0      0      56
Processing:    74  171  82.2    155     642
Waiting:       68  150  81.1    133     628
Total:         74  175  83.4    157     644
Percentage of the requests served within a certain time (ms)
  50%    157
  66%    176
  75%    191
  80%    196
  90%    210
  95%    232
  98%    642
  99%    644
 100%    644 (longest request)

Textpattern 4.6-dev:

bert@jessie:~$ ab -n 100 -c 10 http://jessie/textpattern-dev/
Document Path:          /textpattern-dev/
Document Length:        9823 bytes
Concurrency Level:      10
Time taken for tests:   3.506 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      999300 bytes
HTML transferred:       982300 bytes
Requests per second:    28.52 [#/sec] (mean)
Time per request:       350.575 [ms] (mean)
Time per request:       35.058 [ms] (mean, across all concurrent requests)
Transfer rate:          278.36 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    3  11.3      0      62
Processing:   198  333 124.8    299     930
Waiting:      183  296 121.2    261     870
Total:        198  336 128.3    299     930
Percentage of the requests served within a certain time (ms)
  50%    299
  66%    322
  75%    346
  80%    359
  90%    445
  95%    605
  98%    904
  99%    930
 100%    930 (longest request)

bert@jessie:~$

Last edited by hcgtv (2015-06-24 14:01:30)

Offline

#99 2015-06-24 14:07:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,622
Website

Re: Making plugins first-class citizens

hcgtv wrote #291962:

I can confirm your findings.

Yowzers. A 50% performance drop is waaaay worse than I’d hoped.

My best guess as to the root cause is still just that: a guess. If there are bottlenecks introduced with all the OO overhead (or somewhere else in the system) I’d like to find out exactly where and improve those parts through optimisation or judicial cacheing.

Anyone got any techniques for identifying where 4.6.-dev is spending most of its time?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#100 2015-06-24 18:08:34

hcgtv
Plugin Author
From: Miami, Florida
Registered: 2005-11-29
Posts: 2,634
Website

Re: Making plugins first-class citizens

Went back to tinkering after a big lunch (rice, fried eggs, fried plantains), looked at what was different between the Textpattern 4.5.7 install and the Textpattern 4.6-dev install. Aside from the fact that each install had my templates plugin activated, on the 4.6-dev site, I had the ied_plugin_composer plugin installed and activated also. Never thought an admin side plugin could affect front page speed.

Here are the new tests, sites set to Live, no plugins activated.

Textpattern 4.5.7

bert@jessie:~$ ab -n 100 -c 10 http://jessie/zendstudio/textpattern/
Document Path:          /zendstudio/textpattern/
Document Length:        10017 bytes
Concurrency Level:      10
Time taken for tests:   1.743 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      1025800 bytes
HTML transferred:       1001700 bytes
Requests per second:    57.36 [#/sec] (mean)
Time per request:       174.322 [ms] (mean)
Time per request:       17.432 [ms] (mean, across all concurrent requests)
Transfer rate:          574.66 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    4  14.8      0      71
Processing:    90  165  71.4    153     777
Waiting:       74  143  71.8    133     774
Total:         90  169  73.1    158     777
Percentage of the requests served within a certain time (ms)
  50%    158
  66%    181
  75%    189
  80%    192
  90%    208
  95%    223
  98%    331
  99%    777
 100%    777 (longest request)

Textpattern 4.6-dev

bert@jessie:~$ ab -n 100 -c 10 http://jessie/zendstudio/textpattern-dev/
Document Path:          /zendstudio/textpattern-dev/
Document Length:        10083 bytes
Concurrency Level:      10
Time taken for tests:   2.088 seconds
Complete requests:      100
Failed requests:        0
Total transferred:      1032400 bytes
HTML transferred:       1008300 bytes
Requests per second:    47.90 [#/sec] (mean)
Time per request:       208.781 [ms] (mean)
Time per request:       20.878 [ms] (mean, across all concurrent requests)
Transfer rate:          482.90 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    3  11.7      0      62
Processing:   106  200  89.5    189     825
Waiting:       88  174  90.4    163     794
Total:        106  204  89.9    193     825
Percentage of the requests served within a certain time (ms)
  50%    193
  66%    202
  75%    214
  80%    220
  90%    231
  95%    268
  98%    605
  99%    825
 100%    825 (longest request)

ZendStudio arrived today :)

Offline

Board footer

Powered by FluxBB