Project

General

Profile

Actions

Feature #46615

closed

Speed improvements in ClassLoader

Added by Alexander Opitz over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Could have
Category:
Performance
Target version:
-
Start date:
2013-03-23
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The ClassLoader has different speed problems as he loads and manages big arrays of backward compatibility aliases for classes (for example intersecting arrays with around 2400 and 5000 entries).

So to improve this, we can move this code out to a ClassLoader only for backward compatibility which will do class alias loading if needed. This helps to reduce the loading time if only "modern" code is used.

Speedtest on the start page of the introduction package:

Testsystem: PHP 5.4.13, MariaDB 5.5.29
Testcommand: ab -c 10 -n 100 http://localhorst.typo61/

Before:
Time taken for tests: 19.813 seconds
Total transferred: 23000 bytes
HTML transferred: 0 bytes
Requests per second: 5.05 [#/sec] (mean)
Time per request: 1981.282 [ms] (mean)
Time per request: 198.128 [ms] (mean, across all concurrent requests)
Transfer rate: 1.13 [Kbytes/sec] received

After:
Time taken for tests: 12.570 seconds
Total transferred: 1035500 bytes
HTML transferred: 990700 bytes
Requests per second: 7.96 [#/sec] (mean)
Time per request: 1256.969 [ms] (mean)
Time per request: 125.697 [ms] (mean, across all concurrent requests)
Transfer rate: 80.45 [Kbytes/sec] received


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Epic #47018: Implement Composer support and clean package manager APIClosedThomas Maroschik2013-08-28

Actions
Actions #1

Updated by Alexander Opitz over 11 years ago

  • Assignee set to Alexander Opitz
Actions #2

Updated by Gerrit Code Review over 11 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19249

Actions #3

Updated by Gerrit Code Review over 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19249

Actions #4

Updated by Xaver Maierhofer over 11 years ago

Hello,

i don't know much about the issue above. But your "ab" result is not representative at all.

10 parallel request and 100 request total on a local system is good luck on result. I/O to get all files, cache of your system.

Example here

ab -c 10 -n 100 http://www.XYZ
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.XYZ (be patient).....done

Server Software:        Apache
Server Hostname:        www.XYZ
Server Port:            80

Document Path:          /
Document Length:        19849 bytes

Concurrency Level:      10
Time taken for tests:  0.297 seconds
Complete requests:      100
Failed requests:        0
Write errors:          0
Total transferred:      2018500 bytes
HTML transferred:      1984900 bytes
Requests per second:    336.25 [#/sec] (mean)
Time per request:      29.740 [ms] (mean)
Time per request:      2.974 [ms] (mean, across all concurrent requests)
Transfer rate:          6628.15 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median  max
Connect:        0    0  0.3      0      1
Processing:    21  29  5.4    28      47
Waiting:      21  28  5.4    28      47
Total:        21  29  5.4    28      48

Percentage of the requests served within a certain time (ms)
  50%    28
  66%    29
  75%    31
  80%    33
  90%    36
  95%    39
  98%    47
  99%    48
100%    48 (longest request)

Next time i get one long request "100% 1032 (longest request)" and loading time is by 1.03 sec.

Maybe you use more requests. PHP Mode Version and cache modules (apc, opcache ...) make often a difference from speed.

But in the end - Nice to see you try to speedup thing in TYPO3 core!

Actions #5

Updated by Alexander Opitz over 11 years ago

The test was against another notebook during the FAL code sprint with and without APC (But the results didn't show any changes). So the system was to slow to use other parameters for ab testing.

More data is available in the mailing list:

Starting here: http://lists.typo3.org/pipermail/typo3-team-core/2013-March/053641.html
Continuing here: http://lists.typo3.org/pipermail/typo3-team-core/2013-March/053739.html

Actions #6

Updated by Gerrit Code Review over 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19283

Actions #7

Updated by Alexander Opitz about 11 years ago

  • Status changed from Under Review to Accepted
  • Priority changed from Should have to Could have
  • Target version deleted (6.1.0)
Actions #8

Updated by Alexander Opitz about 11 years ago

  • Status changed from Accepted to Closed

The performance problems were addressed in another way for TYPO3 6.2, who is using a PackageManager which also can handle flow/composer packages. More issues will be handled as subtask of #52304

Actions

Also available in: Atom PDF