Developer forum

Forum » Development » strange behavior on template.output()

strange behavior on template.output()

Ivo Rodrigues
Reply

Hi guys,

I'm having a strange behavior on a custom module, it takes forever for the page to render. The GetContent() method is not the problem, it returns quickly.

Using debug=True I found the info below. What does MEM means?

10:31:13.115 After global paragraphs 0 68533
10:31:13.115 After cdn replace 0 68533
10:31:13.147 After snippets 31 68564
10:31:13.147 After globalTemplate start 0 68564
10:31:13.147 After Page.AfterOutput notification 0 68564
10:31:13.147 Starting template.output (MEM) 0 68564
10:44:31.466 Ending template.output (MEM) - took: 798319,2692 ms. 798319 866883

Replies

 
Nicolai Høeg Pedersen
Reply

MEM is when it is a template instance that is not based on a file, but a string of HTML - i.e. loops.

Could you post your code?

 
Ivo Rodrigues
Reply

Hi Nicolai,

It was indeed a loop that had an incorrect endif tag inside. The web server was deadlocked with this code (1 core @100%) for several minutes.

Thanks for your help.

<!--@If Defined(SiteTop2.Elements.LOOP.Rooms.AvailableAllocation)-->

<!--@SiteTop2.Elements.LOOP.Rooms.AvailableAllocation-->

<!--@EndIf Defined(SiteTop2.Elements.LOOP.Rooms.AvailableAllocation)-->

 

 
Nicolai Høeg Pedersen
Reply

Oh, not a nice one :-). Glad you found it! Thanks for the update.

BR Nicolai

 

You must be logged in to post in the forum