Remove redundant counters and optimize loops#923
Remove redundant counters and optimize loops#923mikemastercorp wants to merge 1 commit intodanpros:masterfrom
Conversation
|
Having that said, the original code would definitely work as is, it is just as small improvement in terms of readability and habits of PHP Devs to use $key => $value in for() loops. Besides that, I've added a few checks to prevent unnecessary loops where a break was needed where an if() criteria is not met... Like I said, Share-ing is Care-ing ;) |
|
Hello, Thanks for the PR. Yes, it is quite old code indeed, and there are many functions that need to be refactored. Let's try to improve it in the future. I already reviewed it. There is one problem, so when the contents of |
|
I will have a look, maybe I overdid some parts as I am not 100% sure how to test all functions and it might have slipped through. If you have any idea on the method responsible for it, it will speed the things up as I've touched a few and have to dig a bit deeper now :) |
Just found your tiny CMS and liked the performance so decided to look under the hood and thought I can pay back my 5 cents on a few code improvements to remove unnecessary counter variables and provide some code improvements.