CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Scalability (Moderator: Donald Lobo) »
  • Big potential speed improvment: Using native smarty caching
Pages: [1]

Author Topic: Big potential speed improvment: Using native smarty caching  (Read 2055 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Big potential speed improvment: Using native smarty caching
September 11, 2010, 06:21:42 am
Hi,

The profile calculation seems to be quite sql intensive, and for forms using it (eg event registration, contrib, sign a petition...), it takes a long time to calculate them each time (> 1000ms).

Was wondering if you have tried to use the native smarty cache features eg. for the anonymous users (because don't want to cache with user data)

I grepped the code and couldn't find anything like that, was wondering if you tried and it failed on something I haven't identified yet.

eg.

Code: [Select]
<?php

In buildform 
and setDefaultValue, add

if(anonymous && !$smarty->is_cached('templates/CRM...tpl'),$entityID)
  return;

And 
in the display (can't find the method, but I'm sure there is one somewhere ;):
require(
'Smarty.class.php');

$smarty->display('templates/CRM...tpl',$entityID);
?>
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Scalability (Moderator: Donald Lobo) »
  • Big potential speed improvment: Using native smarty caching

This forum was archived on 2017-11-26.