HTTPS: Requests per second: 89.07 [#/sec] (mean)
HTTP: Requests per second: 4622.12 [#/sec] (mean)
Be aware: https://twitter.com/jessemcnelis/status/508456580384178178
<?php | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
package main | |
// run with: $ go test --bench=. -test.benchmem . | |
// @see https://twitter.com/karlseguin/status/524452778093977600 | |
import ( | |
"math/rand" | |
"strconv" | |
"testing" | |
) |
#!/bin/bash | |
# Patch apllying tool template | |
# v0.1.2 | |
# (c) Copyright 2013. Magento Inc. | |
# | |
# DO NOT CHANGE ANY LINE IN THIS FILE. | |
# 1. Check required system tools | |
_check_installed_tools() { | |
local missed="" |
HTTPS: Requests per second: 89.07 [#/sec] (mean)
HTTP: Requests per second: 4622.12 [#/sec] (mean)
Be aware: https://twitter.com/jessemcnelis/status/508456580384178178
#!/bin/sh | |
# location of the php binary | |
if [ ! "$1" = "" ] ; then | |
CRONSCRIPT=$1 | |
else | |
CRONSCRIPT=cron.php | |
fi | |
MODE="" | |
if [ ! "$2" = "" ] ; then |
UPDATE `customer_entity` | |
SET `email` = concat('test+', entity_id, '@aGmailDomain.com'); | |
UPDATE `customer_entity_varchar` | |
SET `value` = CONCAT(MD5(concat('qXpassword', entity_id)), ':qX') | |
WHERE `attribute_id` = 12; | |
UPDATE `sales_flat_order` | |
SET customer_email = concat('test+', IFNULL(customer_id, entity_id), '@aGmailDomain.com'); |
DELETE FROM catalog_category_entity_datetime WHERE `value` IS NULL; | |
DELETE FROM catalog_category_entity_decimal WHERE `value` IS NULL; | |
DELETE FROM catalog_category_entity_int WHERE `value` IS NULL; | |
DELETE FROM catalog_category_entity_text WHERE `value` IS NULL; | |
DELETE FROM catalog_category_entity_varchar WHERE `value` IS NULL; | |
DELETE FROM catalog_product_entity_datetime WHERE `value` IS NULL; | |
DELETE FROM catalog_product_entity_decimal WHERE `value` IS NULL; | |
DELETE FROM catalog_product_entity_gallery WHERE `value` IS NULL; | |
DELETE FROM catalog_product_entity_group_price WHERE `value` IS NULL; |
Clicking on one of the Reindex Data links executes the reindex process and immediately shows the URL from action preReindexProcess()
but clicking on that link to initiate a new request takes as long as it takes to wait for the reindexing.
So something is still using the same connection and waits to finish the previous request. How to initiate a new request without waiting for the previous one?
<?php | |
class Zookal_Core_Helper_Data extends Mage_Core_Helper_Abstract | |
{ | |
private $_objectCache = []; | |
public function getCollectionSingleton($modelClass, array $collectionOptions = null, $cacheKey = null) | |
{ | |
$cacheKey = null === $cacheKey ? $modelClass . '/' . json_encode($collectionOptions) : (string)$cacheKey; | |
// $cacheKey = md5($cacheKey); if preferred |
After I have seen that some 3rd party modules duplicate the core_url_rewrite
table to store there additional category rewrite information in it (1), I came to the conclusion that it should be save to remove the joinLeft()
in the flat table classes.
Instead of the joinLeft()
you simply refer to the column main_table.url_path as request_path
in the tables catalog_category_flat_store_[StoreId]
. Please see the new methods.
Downside: To get the correct rewrites in the frontend you need to run the reindex for catalog_category_flat
. During this reindex the correct rewrites will be inserted into the column catalog_category_flat_store_X.url_path
.
Footnotes:
(1) the join with the core_url_rewrite
takes for large product collection really long when you only need the correct rewrite for the categories. This can save per request around ~0.Xsec.