Storing HTML formatted text rather than calling markdown each time
Posted: 29 January 2007 05:45 AM   [ Ignore ]  
Research Assistant
RankRankRank
Total Posts:  547
Joined  01-05-2005

I was thinking about creating an extension that automatically saves a HTML version of a markdown formatted field to another custom field.

So say you have a custom field ‘article_body’ that’s formatted via markdown, when that entry is saved it’ll store the HTML formatted text in ‘article_html_body’.  Then you could just display {article_html_body} without having to call markdown each time the page is loaded.

Do you think there’d be any noticable performance gain from doing this?

 Signature 

Celebrating again soon.

Profile
 
 
Posted: 29 January 2007 08:14 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15743
Joined  06-03-2002

The Markdown plugin isn’t considerably “slow”, so…noticeable performance gain?  Not likely, especially if you are using template caching, but it’s an interesting idea, and of course would have a measurable effect; I just doubt that it will be perceivable.  However, also consider that the time you are saving by pre-formatting the field at publish time is also increasing the memory and time fetching an additional custom field from the database.  We’re talking fractions of fractions of fractions of resources here, though.

 Signature 
Profile
MSG
 
 
Posted: 29 January 2007 11:35 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
RankRankRank
Total Posts:  547
Joined  01-05-2005

Hmm, OK thanks Derek.  There doesn’t seem much point then.  Cheers though.

 Signature 

Celebrating again soon.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64553 Total Logged-in Users: 33
Total Topics: 81156 Total Anonymous Users: 19
Total Replies: 436585 Total Guests: 186
Total Posts: 517741    
Members ( View Memberlist )