Don't Ignore Movable Type's <mt:ignore> Tag

| 153 Comments | No TrackBacks |
When faced with a Movable Type blog that is sometimes slow to publish, you could immediately break out the heavy guns and set up some performance logging to try and find out which templates are taking too long to publish.  There is an entire section of the documentation dedicated to this.  But before editing configuration files and starting to pore over logfiles, don't ignore the humble <mt:ignore> tag...
This tag is basically the equivalent of commenting out a section of template code in Movable Type, a bit like using <!-- and --> in HTML source code which tells the browser to ignore a certain part of the HTML it is trying to display.

HTML comments vs. MT:Ignore
Note that you can also use these HTML escape codes in Movable Type templates, and the end result will look the same visually.

Compare:

Foo
<!--Bar-->
Bla

Foo
<mt:ignore>Bar</mt:ignore>
Bla

Both will result in 'Foo' and 'Bla' being displayed.  The main difference is that the source code for the first bit will still contain the escape codes and the word 'Bar'.  Publishing both snippets of template code will also take about the same amount of time.

Difference
But what if instead of just the word 'Bar' we comment out an <mt:include> tag which brings in a complex template module that takes a long time to publish?

Foo
<!--<mt:include name="Bar">-->
Bla

Foo
<mt:ignore><mt:include name="Bar"></mt:ignore>
Bla

In this case, there is a clear difference.  Publishing the first snippet will take considerably longer than the second snippet.  Even thought the output is not displayed, the first snippet will still include and process the entire module, while the second snippet won't even 'see' the include tag and will skip it completely, resulting in much quicker publication.

Using this for debugging slow templates
You can use this in combination with Movable Type's 'Preview' function on the template editor to quickly 'drill down' into a page  to see which parts are taking unusually long to publish.  The best thing is, you don't even need to save any changes as you work so you can do this on a live site as long as you are careful not to hit the wrong button.

Let's look at a quick example.this is the main index template for this blog:
preview0.jpg

If I hit the 'Preview' button at the bottom I get a screen that shows me what the page will look like should I publish it.  More importantly, at the top of this screen I also get some information about how long it took to publish this page:

preview1.jpg

One point three seconds, not too bad.  But what if I comment out the main <mt:entries> loop, just for fun?  Let's have a look:

preview2.jpg

Note: here I have to be careful to hit 'Preview' and not 'Save Changes' or even 'Save & Publish'.  The result (i.e. my main page without the entries) looks like this:

preview3.jpg

OK, so not much to look at, I admit.  But what I am most interested in is this:

preview4.jpg

Zero point fourteen seconds...  That means the entries take up the bulk of the time needed to publish this page.  (It also means my sidebar is optimized really well.)  If I wanted to optimize this page further, I would now start looking into the 'Entry Summary' module that was between my <mt:ignore> tags to see where further improvements could be made, but since this page already publishes reasonably fast I won't bother here.  Generally speaking, any template publishing in under one or two seconds is fine, it is the ones that take more than that you need to worry about.

One tip though: once you start optimizing includes, you either have to start saving the included modules as you edit them (else the changes won't show up in the preview) or you could simply copy-paste their contents into the 'main' template and keep on 'Preview'-ing as you <mt:ignore> your way through them to identify the slow spots.

No TrackBacks

TrackBack URL: https://www.movabletips.com/cgi-bin/mt/mt-tb.cgi/60

153 Comments

Great tips Maarten... I'm considering about changing to Movable Type from Wordpress after hearing quite a few positive things about it. Do you think it would be worth it or should I just stick to what I have learned with WP?

's Court. Yesterday,ray ban pas cher, Ir ray ban pas cher on Mountain People's Court accused hospi louboutin pas cher tal workers Daye Iron WISCO compensate the plaintiff Ben Koon made a total of 100,000 yuan, the two sides are dissatisfied wi air jordan th the verdict, will soon bring an appeal. Was diagnosed with cancer, yellow dad has been a gre

​​Hantai District Hanzhong City S louboutin pas cher afety Production Supervision Bureau,louboutin pas cher, former director abercrombie pas cher of Longmou,abercrombie pas cher, 130,hollister france,000 yuan in bribes during his tenure.

After Longmou below the national security hollister france incident handling standard fines under certain group

Immigration unexplained" Burmese female. On the da abercrombie y 13:05, Jinhua high-speed traffic poli hollister france ce detachment received a report of four teams,abercrombie, one brand for Jiangxi E50467 blue bus was driving on the road Jinhua Yongjin Expressway, which may take the illegal abercrombie immigration officer. Half an hour la

dirty five abercrombie pas cher swords. Wuliangye or maximum,a abercrombie paris bercrombie pas cher, from 490 yuan / bottle rose to 530 yuan / bottle; followed by Maotai flying 52 degrees rose to 6 hollister france 20 yuan from 610 yuan / bottle / bottle,abercrombie paris, 52 degrees star rose to 608 yuan from 605 yuan / bottle / bottles; Jiannanchun also

's chief designer Huang Jiangchuan des hollister france cribes three possible endings. Huang Ji abercrombie pas cher angchuan said that Chang E One satellite last "controlled collision Month" is an additional task, could be so "excess" to complete the task, mainly because of satellite status is still good a hogan outlet nd there is enough fuel left,hol

's protection of housing starts in Ji abercrombie france angsu tas hollister france k is 275,000 units,abercrombie france, but yesterday Reporters learned from the meeting, Jiangsu and again since the pressure started target of 315,000 units, plus the payment of rental subsid abercrombie france ies to 45,000 low-rent housing , for a total of 36 million set

The professionals, which is bursting charge bl air jordan own upper part of the hole,air jordan, then still remained above the detonatio louboutin pas cher n wires.

"At present the quarry has given me to pay the medical expenses from my eyes,louboutin pas cher, took out two stones, and now eyes feel a little mill, the o hogan the

elderly more insecure,abercrombie france, once someone rescue, some elderl abercrombie france y people will inevitably seize them ray ban as straw, or even resort to despicable means, and this is the new one brings a vicious cycle, and so forth, social

She said that for those who are elderly blackmail case, the court' hollister s

's Port Royal Golf Course recent mulberry sale ly hired these four "East Turkistan" elements,mulberry sale, from last week, abercrombie pas cher abercrombie pas cher, they began work on the golf course,ray ban pas cher, is about to start in October of professional golf majors do simple preparations. P ray ban pas cher ort Royal Golf Course of the hiring

's environmental cause. hollister france This is so far away in the United States of the UN Inte louboutin rgovernmental Panel on Climate Change (IPCC) in the main Xi Paqiao very touched. Yesterday, ecological and cultural association office in Hangzhou,hollister france, two a hogan lthough thousands of miles apart,louboutin, but the

' fees. "Without tha mulberry outlet uk t time and effort,mulberry outlet each piece is material." Needs to be signed by me personally signed uk, maybe for a little overtime money also smashed their jobs!" Wang says with exasperation.


相关的主题文章:


each piece is material." Needs to be signed by me personally signed

's ray ban uncle to help identify the object,ray ban, when t mulberry sale he man met with Jo expressed satisfaction after the Ni a c abercrombie paris onnection with the man talk about "bride price",mulberry sale, more than 23 million yuan,abercrombie paris, ranging from twelve million people will then 3 dividing the money. 3 people in Anh

ZHANG You-zhong,air jordan pas cher, 26-y air jordan pas cher ear-old Shandong Linyi.


Subsequently,abercrombie france, ZHAN abercrombie france G You-zhong pretended to Shandong Province Admissions staff, recognizing the Ministry of Education staff, Sanmenxia City, Henan Province, defrauded two entr mulberry outlet ance parents, an art teacher

Hello just wanted to give you a quick heads up and let you know a few of the pictures aren't loading correctly.
I'm not sure why but I think its a linking issue.
I've tried it in two different browsers and both show the same results.

's first case before the Court. To build a hous abercrombie france e on their own patrimony demolitions yesterday, the case i abercrombie paris n Shunyi court of first instance administrative court hearing. Ms. Cui Cui old man and nieces alleged housing shortage due to two people, began in September last year, in their own old homestead abercrombie pas cher

's eco-responsible for the world Tibet 1.2 million square kilometers of land, a abercrombie paris ccounting for one-eighth of China's land area. But 1.2 million square ray ban pas cher kilometers on one-third of protected areas in the country's premier large area. Qinghai-Tibet Plateau is the world's climate, "starter" Asian "water t abercrombie o

c hollister rew duty performance hogan issues; Municipal People's Congress, the city and the Municipal People's Congress Standing Committee members special committee's motion,h louboutin pas cher ollister, suggestions, criticisms and comments,hogan, questions and crew involved in the case law duty performance issues; higher or lower as

's Court upheld the Song Fang co hogan outlet mmuted to 5 years imprisonment. According ray ban to the introduction,hogan outlet, in 1980, Song Fang began Lingbi Damiao abortion family planning services are engaged, midwives and other work,ra air jordan pas cher y ban, in 1985 to obtain individual licenses to practice medicine, healers quali

's Higher hollister Education Reform "experimental fiel abercrombie pas cher d",hollister, South University of Technology in May 2007 started to build. March 1,abercrombie pas cher, 2011,aber abercrombie france crombie france, the first reform STSP experimental class 45 students enrolled. April 16,air jordan, 2012,ray ban pas cher, the Ministry of Ed

Bulletin said that from July 2008 abercrombie pas cher to April 2009,abercrombie pas cher, former Mayor Feng mulberry outlet Anlong YUNXI hosted many special meeting, a clear industrial companies in the county within the county heyday exploration a abercrombie pas cher nd mining of limonite resources.

Metropolis Daily News (Reporter Chen Jun) yester

'clock yesterday afternoon, Deyan hogan outlet g Jingya louboutin pas cher ng town of Xinchang Gas Field Paterson New No. 926-2 car horn is heard fracturing the well blew,hogan outlet, marking the number of new hollister wells in the next fracturing string 926-2 process to completely eliminate the danger. Meanwhile, the field will be official

's "United Evening News" reported that the Shanghai World Expo abercrombie paris ,abercrombie paris, Taipei Museum of cases ray ban pas cher opened this morning,ray ban pas cher, greet visitors from around the world. Taiwanese director Hou Hsiao-hsien create real 3D stereoscopic film, so that tourists are astounded, pu mulberry outlet t on 3D glasses,

's public service agencies, public service undert louboutin pas cher akings to accept gifts, such as disaster re abercrombie paris lief, poverty alleviation. Beijing Tianyi Law Firm Litigation Department Zhangsheng Gui lawyer agrees. He told reporters, to regulate the behavior of donors and recipients,louboutin pas cher, hollister france China in 1999 in

'an su abercrombie rrounding a "three rooms and a bathroom," the cave (about 70 square met hollister france ers),abercrombie, can be sold for $ 46,000; a simple one-room cave, you can also order $ 30 / day rental price. Read the report, can only sigh own louboutin national conditions really did not understand. As reported said, the cave is

's lives and louboutin pas cher proper abercrombie ty of the highly responsible spirit,louboutin pas cher, take a systematic approach to be addressed com air jordan pas cher prehensively, quickly moved the masses to ensure that "a person does not hurt a dead man." Ningxiang geological subsidence involving Great Bridge, Meitanba,abercrombie, Yu Au home

insti hollister tutions for new recruits") will bid farewell to finance pension, p air jordan erform "Social Security + occupational pension," the new system. Shenzhen Univers hogan outlet ity Law School professor Diyu Juan in the "First Financial Daily" reporters,hollister, said that the reform does not make much sense, but the pre-ci

'Wan louboutin pas cher ted' him! "Recently, many well-known websites on the forum there such a" louboutin wanted "post. With the divorce trial of the case together,louboutin pas cher, the mysterious person who posted surfaced that he was actually a junior S hogan hucheng Ji. Shimou son describes his father who Shimou is Shucheng Hang

's birthday last abercrombie paris year to send gold necklace, and before Ms Wu re hogan act, neck necklace has been Fei Juzei robbed. Not far away, from Anhui master Cui was riding my bike to work, Hongqiao Town. After h louboutin pas cher earing Ms Wu distress, Cui master back to see Miss Hu is catching a motorcycle, he stopped to stand side

's Court abercrombie paris to submit their applications for sta abercrombie te compensation, Nanchang Railway Public Security Bureau requested compensation for his $ 10,abercrombie paris,000 and interest. It is reported that ray ban pas cher on April 19, the Nanchang Railway Police Kaixian again to send someone to the repayment still being Cao Gu

's hollister france high school graduates enroll repetition. However, th hollister e reporter recently discovered in the interview, some public high school in Hubei operate in sec ray ban pas cher ret repeat classes. College entrance exam this year,hollister france, had a history of repeat Hubei Ezhou an unnamed private secondary school princip

​​surveillance and found two men acting suspiciously in the interrogation that louboutin two suspicious men flustered, and one of them tried to escape,louboutin, subdued abercrombie france by police on the spot,abercrombie france, and bring them back to the branch to continue to review. 16:35, the blessing Towns a demolition a ray ban v

(Original title: a freighter ran aground in waters Yantai All 14 crew members hollister were rescu barbour jacket ed),hollister

According to Yantai Maritime Safety Administration,barbour jacket, currently rescued without injury,parajumpers pas cher, distress waters does not appear oil pollution.


Zhen bi parajumpers pas cher g

For the "o abercrombie pas cher ther factors," he explained rather vague,aber hogan crombie pas cher, "there may be some pressure on it." ■ Playback ● 1992 Barcelona Olympic Ga barbour mes, the Olympic champion Zhuang Xiaoyan together with other companies to provide complimentary Jianlibao pot of gold, then Giver said

"We have t

increasing enthusiasm.

theory an piumini moncler d world peace and development, and globalization and other topi hollister cs. challenges ahead, the two sides can be found in the exchange of a lot in common, for future inter-party exchanges and international cooperation has laid a good foundation. "Becaus barbour jacket e German two

,hollister
bring tangible benefits,parajumpers.


's President Olafur Ra hollister gnar Grimsson,hollister uk, 13,hogan outlet, said he was Iceland and Chin parajumpers a relations in the future development of confidence.

Ambassador Ma first conveyed Chinese President Hu Jintao's cordial greetings to Presiden hollister uk t

magic card" out "Tazza" (gambli hollister outlet ng cheating) Liling City of Industry ,hollister hollister outlet

Currently,hollister, Liling City,abercrombie pas cher, the public security organs have been involved members of the Communications an abercrombie pas cher d Investigating the case.

26 evening,barbour, Zhuzhou Municipal Pr

(Original title: "Mao annotation Twenty-Four Histories" horizo parajumpers pas cher ntal simplified the publication in Beijing)


The book hollister Total 91, n 16, clothbound.

Mao Zedong,parajumpers pas cher, "Twenty-Four Histories" annotations and comments, based on the eyes of the great statesman and strategist hollister uk t

Taking into a hollister uk ccount the development of China's industrialization, "full implem hollister france entation of the system of paid leave may also need a considerable period of time." "Outline proposed, agencies,hollister uk, organization hogan s, enterprises and institutions should take the lead to implement workers paid annual

Third, we must focus on common long-term interests, and unswervingly hogan outlet promote the inte hollister outlet gration of East Asia, and promote regional peace and prosperity.

(Feng Jian Chi Jia)


Scheduled for China-ASEAN Summit signed after China - ASEAN Free Trade Area "investment agreement" piumini moncler , which marks t

, oppose trade and investment protectionism, support for hollister uk the Doha Round negoti hollister ations on the basis of results have been locked early, comprehensive and balanced outcome; in promoting regional integration,hollister uk, improve t hogan outlet rade and investment environment,hollister, strengthen regional ties to sup

Wen said the two sides should seize the perfect way barbour sale investment laws and regulations,barbour sale, abercrombie the elimination of all barriers to investment, and actively carry out various forms of investment promotion activities to promote bilateral investment as soon as p barbour ossible to achieve substantial growth.

Eleventh CPPCC National Committee fourth meeting,parajumpers parajumpers , CPPCC, the CPPCC participating units and the special com mulberry sale mittee,mulberry sale, conscientiously implement the guiding ideology of the conference, spoke highly of the people of all nationalities with Comrade Hu Jintao as gener hollister outlet al secretary of

The drug retai mulberry outlet l enterprises, focusing on inspection companies perform drug classification mana hogan outlet gement system, strict compliance with the single selling limited regulations,mulberry outl abercrombie et, inspection,hogan outlet, registration purchaser ID card and so on.

combining drugs electronic monitoring

Int barbour outlet er barbour view key test interview staff of professional quality,barbour outlet, service levels and ot hogan outlet her comprehensive ability.

For details,barbour, log Beijing group work network, Beijing Human Resources and Social Security Network,hogan outlet, Beijing Personnel Testing Network queries.


In abercrombie addition, a num barbour sale ber of deputies and members believe,abercrombie, the "Little Three" "bastards", "sex", "house" mulberry sale and so the network report, accompanied by conflicting interests, or even malicious attacks, to some extent relieved the seriousness of corruption.

NPC deputy Li of Hainan Universi

Data evaluation of the role of scientific research abercrombie , to avoid absolute.

Congress pr hogan esident Ji had previously raised concerns only the amount of SCI and SSCI posting, it is impossible to build a world-class university.

The barbour uk teacher also said,abercrombie, like "China Social Science" acqu

's 18 on party building deploymen barbour jacket t and task decomposition hollister outlet implemented,barbour jacket,

To establish a sound mechanism to carry forward the good style,hollister outlet, performance evaluation criteria have style,p parajumpers outlet arajumpers outlet, style-oriented cadre have, so reward and punishment.

T

Leave a comment