Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use caching to speed up route parsing #16028

Merged
merged 18 commits into from Mar 28, 2020

Conversation

@williamdes
Copy link
Member

williamdes commented Mar 14, 2020

Use caching for routing parsing.

I reduces the amounts of php function calls from ~1200 to ~3

Ref: #16005

@williamdes williamdes requested review from mauriciofauth and ibennetch Mar 14, 2020
@williamdes williamdes self-assigned this Mar 14, 2020
@williamdes williamdes added this to the 5.1.0 milestone Mar 14, 2020
@williamdes

This comment has been minimized.

Copy link
Member Author

williamdes commented Mar 14, 2020

Yes, I added more code safe-guards than necessary so nobody reports blank pages

@williamdes

This comment has been minimized.

Copy link
Member Author

williamdes commented Mar 14, 2020

@williamdes williamdes force-pushed the williamdes:perf/cachedRouting branch from 3007957 to 08cea43 Mar 14, 2020
Copy link
Member

mauriciofauth left a comment

💯

index.php Outdated Show resolved Hide resolved
@williamdes williamdes force-pushed the williamdes:perf/cachedRouting branch from 08cea43 to 907627e Mar 18, 2020
@codecov

This comment has been minimized.

Copy link

codecov bot commented Mar 18, 2020

Codecov Report

Merging #16028 into master will increase coverage by 0.20%.
The diff coverage is 17.56%.

@@             Coverage Diff              @@
##             master   #16028      +/-   ##
============================================
+ Coverage     51.39%   51.60%   +0.20%     
- Complexity    14956    14976      +20     
============================================
  Files           470      471       +1     
  Lines         62145    62189      +44     
============================================
+ Hits          31940    32091     +151     
+ Misses        30205    30098     -107     
@williamdes

This comment has been minimized.

Copy link
Member Author

williamdes commented Mar 18, 2020

@ibennetch I made some changes to the release script, are you okay with them ?

@williamdes williamdes added this to In progress in pull-requests via automation Mar 18, 2020
@williamdes williamdes added this to Code base in Enhancements Mar 18, 2020
@williamdes williamdes moved this from In progress to Review in progress in pull-requests Mar 18, 2020
@williamdes williamdes force-pushed the williamdes:perf/cachedRouting branch 2 times, most recently from 718021d to 9db1ee2 Mar 18, 2020
Copy link
Member

ibennetch left a comment

Looks good to me. I've added a few comments but think this is a good development.

libraries/cache/.gitignore Show resolved Hide resolved
scripts/create-release.sh Show resolved Hide resolved
libraries/cache/.gitignore Show resolved Hide resolved
@ibennetch

This comment has been minimized.

Copy link
Member

ibennetch commented Mar 18, 2020

I made some changes to the release script, are you okay with them ?

Sure, they look good to me.

libraries/classes/Routing.php Outdated Show resolved Hide resolved
libraries/classes/Routing.php Outdated Show resolved Hide resolved
libraries/classes/Routing.php Outdated Show resolved Hide resolved
@@ -243,7 +240,7 @@ if [ ! -d libraries/tcpdf ] ; then
cp composer.json composer.json.backup
echo "* Running composer"
composer config platform.php "$PHP_REQ"
composer update --no-dev
composer update --no-dev --optimize-autoloader

This comment has been minimized.

Copy link
@mauriciofauth

mauriciofauth Mar 18, 2020

Member

Will this work with customs plugins?

This comment has been minimized.

Copy link
@williamdes

williamdes Mar 18, 2020

Author Member

Good catch, I will try to be sure of that

This comment has been minimized.

Copy link
@williamdes

williamdes Mar 28, 2020

Author Member

Custom plugins load as expected:

  • tested a custom auth plugin
  • tested a custom export plugin
@williamdes williamdes force-pushed the williamdes:perf/cachedRouting branch from 9db1ee2 to 40e4b95 Mar 18, 2020
@williamdes williamdes requested review from mauriciofauth and ibennetch Mar 18, 2020
pull-requests automation moved this from Review in progress to Reviewer approved Mar 18, 2020
Copy link
Member

mauriciofauth left a comment

Good job. 💯

libraries/vendor_config.php Outdated Show resolved Hide resolved
libraries/classes/Command/CacheWarmupCommand.php Outdated Show resolved Hide resolved
@williamdes williamdes force-pushed the williamdes:perf/cachedRouting branch from fd91254 to f19bf8f Mar 18, 2020
@williamdes williamdes force-pushed the williamdes:perf/cachedRouting branch from f3154dc to 8da5412 Mar 19, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added 15 commits Mar 18, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Ref: https://getcomposer.org/doc/articles/autoloader-optimization.md
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>

Fix some phpdoc comments

Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Ref: 4d2800d

Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes force-pushed the williamdes:perf/cachedRouting branch from 8da5412 to 225ee2b Mar 28, 2020
williamdes added 2 commits Mar 28, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this pull request Mar 28, 2020
Pull-request: #16028
Signed-off-by: William Desportes <williamdes@wdes.fr>
@williamdes williamdes merged commit 94760f4 into phpmyadmin:master Mar 28, 2020
2 of 4 checks passed
2 of 4 checks passed
codeclimate 5 issues to fix
Details
codecov/patch 17.56% of diff hit (target 51.39%)
Details
DCO DCO
Details
codecov/project 51.60% (+0.20%) compared to a7e8b0f
Details
pull-requests automation moved this from Reviewer approved to Done Mar 28, 2020
@williamdes williamdes deleted the williamdes:perf/cachedRouting branch Mar 28, 2020
@williamdes williamdes removed the request for review from ibennetch Mar 28, 2020
@williamdes williamdes moved this from Code base to Done in Enhancements Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
pull-requests
  
Done
Enhancements
  
Done
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.