Having installed Lightbox2, left it at default settings, and then applied a Lightbox 2 preset -> preset formatter in a View, the homepage goes from 6 seconds to 14 seconds load time.

Disabling the lightbox2 module brings the page load time back down again.

I ran XHProf and the stand out stats seems to be:

Lightbox2 enabled:

- functions_exists: 2,963,173 calls.
- Parent: _theme_process_registry: 2,800,512 calls
- Parent: _theme_build_registry: 70 calls

Lightbox2 disabled:

- function_exists: 379,006 calls
- Parent: _theme_process_registry: 325,741 calls
- Parent: _theme_build_registry: 69 calls

It doesn't appear to be 100% reproduce-able. The numbers above are from a staging environment, that initially had the module enabled and all pages were loading normally, however since pushing the module to the live environment (with the same amount of setup at the start of this post) and experiencing slow page loads, pulling the live database back to staging has yielded the above findings.

I'll give Dev module a go to see if that happens to do anything and report back.

Comments

carn1x’s picture

Seeing the same behaviour with 6.x-1.x-dev

carn1x’s picture

Version: 6.x-1.11 » 6.x-1.x-dev
carn1x’s picture

If I comment out lightbox2_theme: 927-1005 (eliminating the imagecache_presets loop) then the calls drop down to:

- function_exists: 385,378
- _theme_process_registry: 331,812

I should mention I have exactly 50 imagecache presets, most of which are in use although I could probably cull a few.

Commenting out lines 984-1005 (eliminating the imagecache_presets as destination loop) drops the calls down to:

- function_exists: 520,694
- _theme_process_registry: 460,512

In fact, the only configuration I really have any need for is Lightbox: Preset -> Original, so I then commented out 933-1005, which drops the calls to:

- function_exists: 397,694
- _theme_process_registry: 343,512

Is this behaviour anybody else can replicate with a large number of presets? Perhaps it would be useful to implement some form of control to the user for which preset configurations they'll need and enable/disable them accordingly. If I'm the only one who can replicate this however, then it's obviously not worth it and I probably have some incompatibility with other modules.

KoshaK’s picture

The same to me, have several Presets and website EXTREEEMLY SLOW when Lightbox enabled.
was reading somewhere that it's all connected with Cash, CCK, Lightbox and Imagecash, because of high volume of calls to database O_o - any way - i'm not really know what i'm talking about.. ;o)