Nicolaas--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To post to this group, send email to silverst...@googlegroups.com.
To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.
One thing we noticed is that performance for CMS content editing
between administrators and non-administrators was almost twice as fast
- for example, bringing up a new page in the editor interface may take
3 seconds for an admin, but 6 seconds for a conventional editor.
Buried in the code there is a check for if a user has admin privs, and
if so, it bypasses all the permissions checks - for non-admins the
permissions checks take relatively huge amounts of time.
The difference is much smaller for small sites - our site has over
a thousand pages. We haven't looked into how to tweak the code for
non-admins - it seemed a lost cause since 3.0 was coming out.
Steve
--
"Sow a thought, reap an action. Sow an action, reap a habit. Sow a
habit, reap a character. Sow a character, reap a destiny." - Samuel
Smiles
static function get_existing_translations() {$locales = array();// TODO Inspect themes$modules = SS_ClassLoader::instance()->getManifest()->getModules();foreach($modules as $module) {if(!file_exists("{$module}/lang/")) continue;$moduleLocales = scandir("{$module}/lang/");foreach($moduleLocales as $moduleLocale) {preg_match('/(.*)\.[\w\d]+$/',$moduleLocale, $matches);if($locale = @$matches[1]) {// Normalize locale to include likely region tag.// TODO Replace with CLDR list of actually available languages/regions$locale = str_replace('-', '_', self::get_locale_from_lang($locale));$locales[$locale] = (@self::$all_locales[$locale]) ? self::$all_locales[$locale] : $locale;}}}// sort by title (not locale)asort($locales);return $locales;}
I am wondering if we could have some sort of setting where we can just set the locales available as this would add some speed. For example, for a fash and chaps store only one locale is ever relevant (AFAIK).
I am posting this here, because in the previous post for this "topic", we identified the "language file searches" as one of the culprits for making Sapphire 2.4 run slow.
I dont have time to investigate this in further detail, but I hope it can help some people (i.e. if you run 2.4 then you can replace i18n::get_existing_translations() with: (UNTESTED - CHECK EXACT FORMAT OF ARRAY)static function get_existing_translations() {return array("en_NZ" => "en_NZ");}
Nicolaas
--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To view this discussion on the web visit https://groups.google.com/d/msg/silverstripe-dev/-/suysHfZB5rsJ.
C'mon, this is just a guess, not even a measured phenomenon, right?
--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To view this discussion on the web visit https://groups.google.com/d/msg/silverstripe-dev/-/ZMn0fgyvJOcJ.