11
trabis
Re: Performance SmartSection 2.14
  • 2010/2/8 14:15

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


kernel/object.php get() may be requested several times in one page load and you cannot be sure that 0,0001 result is from the call you made from smartsection. The result will be for the last piece of code that runs a $handker->get().

I think you should try to find $objs=$handler->getObjects(); and $objs->toArray();

This methods when used with little care can waste many memory and the toArray() can be time consuming when rendering text areas on many objects. Probably you will find that toArray is used even when no text area is displayed, look into blocks.
Also,there is a create and drop table in smartsection front page that is very heavy.

12
lolpant
Re: Performance SmartSection 2.14
  • 2010/2/8 14:52

  • lolpant

  • Just popping in

  • Posts: 41

  • Since: 2007/3/19


I have removed all calls to getObjects and toArray because yes, these would be expensive methods to execute.

What worries me is the time taken to execute $obj->get() increases as the number of rows in the database increases. In addition, the amount of memory required by PHP to execute the page also grows.

The code I have shown above is all that I am executing and the Total time required by XOOPS to load the page is 6 seconds (on average), whereas a fresh install of the module with very few rows ( < 100) probably takes 1seconds to render.



13
trabis
Re: Performance SmartSection 2.14
  • 2010/6/20 10:29

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Sorry for the late reply!

If you look at smartsection/class/item.php you will find that the get() method is overriden and calls assignOtherProperties();

The assignOtherProperties() will get a category and a permission handler and perform extra logic.

The permission handler will get permissions for that item, is not a problem.

The categories handler will get all smartsection categories as objects and if you look into it, the getObjects() is also overridden to get corresponding permissions. Since it use static variables this will happen only once in a request but it will still be a problem for large database sets.

Bottom line, while you think you are asking for just one object, you are asking for hundreds of them.

14
mekano
Re: Performance SmartSection 2.14
  • 2012/8/21 10:18

  • mekano

  • Just popping in

  • Posts: 22

  • Since: 2008/1/14


Hi lolpant,

Did you have any progress with resolving this?

Did you perhaps find another module that does the job as well or better?

Regards,

mekano

15
chefry
Re: Performance SmartSection 2.14
  • 2012/9/4 12:49

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


Smartsection had a lot of problems.

Switch to Publisher. You can import from smartsection and it works great. I've got over 20,000 articles in mine with no delay or performance issues

You will find it very familiar as Trabis basically re-did smartsection with a lot of performance improvements

Login

Who's Online

270 user(s) are online (179 user(s) are browsing Support Forums)


Members: 0


Guests: 270


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits