Post by straightlight » Sat Oct 14, 2017 9:21 am

According to StackOverflow.com, initiating counters with the variable at the front and then use the ++ signs afterwards reduces performance as opposed to the ++ signs then adding the variables.

For instance:

Code: Select all

$i++
should rather be:

Code: Select all

++$i
There are already system library files that demonstrates the proper use of the initiated counters through Opencart. That being written, since it cannot be said on the forum, followed are all the list of files regarding the use of: ++ that would need to be switched:

Code: Select all

system/helper/general.php
system/helper/utf8.php
system/library/pagination.php
vqmod/install/ugrsr.class.php
admin/controller/marketplace/modification.php
admin/controller/marketplace/openbay.php
admin/controller/sale/recurring.php
admin/controller/tool/backup.php
admin/controller/tool/log.php
admin/model/catalog/category.php
catalog/controller/account/download.php
install/model/upgrade/1000.php
install/model/upgrade/1002.php
install/model/upgrade/1009.php
system/elfinder/php/elFinder.class.php
system/elfinder/php/elFinderVolumeDriver.class.php
system/elfinder/php/elFinderVolumeDropbox.class.php
system/elfinder/php/elFinderVolumeFTP.class.php
system/elfinder/php/elFinderVolumeMySQL.class.php
system/library/db/mssql.php
system/library/db/mysql.php
system/library/db/postgre.php
system/library/openbay/ebay.php
system/storage/vendor/scss.inc.php
admin/controller/extension/dashboard/activity.php
admin/controller/extension/dashboard/chart.php
admin/controller/extension/dashboard/customer.php
admin/controller/extension/dashboard/map.php
admin/controller/extension/dashboard/online.php
admin/controller/extension/dashboard/order.php
admin/controller/extension/dashboard/recent.php
admin/controller/extension/dashboard/sale.php
admin/controller/extension/fraud/fraudlabspro.php
admin/controller/extension/openbay/amazonus_product.php
admin/controller/extension/openbay/amazon_product.php
admin/controller/extension/payment/klarna_account.php
admin/controller/extension/payment/klarna_invoice.php
admin/controller/extension/payment/laybuy.php
admin/controller/extension/payment/securetrading_ws.php
admin/model/extension/dashboard/chart.php
admin/model/extension/dashboard/sale.php
admin/model/extension/openbay/ebay.php
admin/model/extension/payment/amazon_login_pay.php
admin/model/extension/payment/cardconnect.php
admin/model/extension/payment/laybuy.php
admin/model/extension/report/customer.php
admin/model/extension/report/sale.php
catalog/controller/extension/credit_card/sagepay_direct.php
catalog/controller/extension/module/banner.php
catalog/controller/extension/module/carousel.php
catalog/controller/extension/module/slideshow.php
catalog/controller/extension/payment/authorizenet_aim.php
catalog/controller/extension/payment/bluepay_redirect.php
catalog/controller/extension/payment/cardinity.php
catalog/controller/extension/payment/eway.php
catalog/controller/extension/payment/firstdata_remote.php
catalog/controller/extension/payment/g2apay.php
catalog/controller/extension/payment/globalpay_remote.php
catalog/controller/extension/payment/klarna_account.php
catalog/controller/extension/payment/klarna_invoice.php
catalog/controller/extension/payment/laybuy.php
catalog/controller/extension/payment/perpetual_payments.php
catalog/controller/extension/payment/pp_express.php
catalog/controller/extension/payment/pp_payflow.php
catalog/controller/extension/payment/pp_pro.php
catalog/controller/extension/payment/realex_remote.php
catalog/controller/extension/payment/sagepay_direct.php
catalog/controller/extension/payment/sagepay_server.php
catalog/controller/extension/payment/sagepay_us.php
catalog/controller/extension/payment/securetrading_ws.php
catalog/controller/extension/payment/web_payment_software.php
catalog/model/extension/fraud/fraudlabspro.php
catalog/model/extension/openbay/ebay_product.php
catalog/model/extension/payment/alipay.php
catalog/model/extension/payment/cardconnect.php
catalog/model/extension/payment/laybuy.php
catalog/model/extension/payment/pp_express.php
catalog/model/extension/payment/sagepay_direct.php
catalog/model/extension/payment/sagepay_server.php
catalog/model/extension/payment/worldpay.php
system/elfinder/php/libs/GdBmp.php
system/library/template/Twig/Lexer.php
system/library/template/Twig/Template.php
system/library/template/Twig/TokenStream.php
system/library/template/Twig/Extension/Debug.php
system/library/template/Twig/Loader/Filesystem.php
system/library/template/Twig/Node/ForLoop.php
system/library/template/Twig/Node/Macro.php
system/library/template/Twig/Node/Module.php
system/storage/vendor/leafo/scssphp/scss.inc.php
system/storage/vendor/symfony/polyfill-mbstring/Mbstring.php
system/library/template/Twig/Node/Expression/Array.php
system/library/template/Twig/Node/Expression/Call.php
system/storage/vendor/guzzlehttp/guzzle/src/BatchResults.php
system/storage/vendor/guzzlehttp/guzzle/src/QueryParser.php
system/storage/vendor/guzzlehttp/guzzle/src/RequestFsm.php
system/storage/vendor/guzzlehttp/streams/src/AppendStream.php
system/storage/vendor/guzzlehttp/streams/src/Utils.php
system/storage/vendor/guzzlehttp/streams/tests/AsyncReadStreamTest.php
system/storage/vendor/react/promise/src/CancellationQueue.php
system/storage/vendor/react/promise/src/functions.php
system/storage/vendor/react/promise/src/Promise.php
system/storage/vendor/react/promise/tests/FunctionResolveTest.php
system/storage/vendor/symfony/translation/DataCollector/TranslationDataCollector.php
system/storage/vendor/symfony/translation/Dumper/MoFileDumper.php
system/storage/vendor/symfony/translation/Loader/MoFileLoader.php
system/storage/vendor/symfony/translation/Tests/PluralizationRulesTest.php
system/storage/vendor/symfony/validator/Constraints/File.php
system/storage/vendor/symfony/validator/Constraints/IsbnValidator.php
system/storage/vendor/symfony/validator/Constraints/IssnValidator.php
system/storage/vendor/symfony/validator/Constraints/UuidValidator.php
system/storage/vendor/braintree/braintree_php/lib/Braintree/Digest.php
system/storage/vendor/braintree/braintree_php/lib/Braintree/ResourceCollection.php
system/storage/vendor/guzzlehttp/guzzle/src/Message/AbstractMessage.php
system/storage/vendor/guzzlehttp/guzzle/src/Subscriber/Redirect.php
system/storage/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php
system/storage/vendor/guzzlehttp/ringphp/tests/Client/CurlFactoryTest.php
system/storage/vendor/guzzlehttp/ringphp/tests/Client/CurlHandlerTest.php
system/storage/vendor/guzzlehttp/ringphp/tests/Client/CurlMultiHandlerTest.php
system/storage/vendor/guzzlehttp/ringphp/tests/Client/Server.php
system/storage/vendor/guzzlehttp/ringphp/tests/Future/FutureValueTest.php
system/storage/vendor/symfony/validator/Tests/Constraints/AbstractConstraintValidatorTest.php
system/storage/vendor/symfony/validator/Tests/Constraints/AllValidatorTest.php
system/storage/vendor/symfony/validator/Tests/Constraints/CollectionValidatorTest.php
system/storage/vendor/symfony/validator/Tests/Fixtures/FilesLoader.php
system/storage/vendor/zoujingli/wechat-php-sdk/Wechat/Lib/Prpcrypt.php
system/storage/vendor/zoujingli/wechat-php-sdk/Wechat/Lib/Tools.php
Note: There might be some, but very few, that may already display the right structure.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 33 guests