Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-11-22 07:41:37

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,595
GitHub Twitter

Newbie questions

Hi folks !

Two newbie questions:

  1. What are the implications when Textpattern CMS shows this warning message “Article tags cannot be used outside an article context” (in testing mode) even if I get the results I want?
  2. What are your best practices in order to reduce the among of data base queries?

These are very good newbie questions, isn’t it?


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#2 2014-11-22 11:12:49

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Newbie questions

  1. None, as long as you don’t upgrade TXP. It may fail to work as you expect in the future (also: FAQ and Wiki
  2. Use a caching plugin within TXP… or optimize your MySQL install so it caches queries as much as possible and uses indexes to speed up queries.

Offline

#3 2014-11-22 12:53:26

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,595
GitHub Twitter

Re: Newbie questions

Thank you Ruud. It’s always a pleasure to read you ;)

OK.

IMHO <txp:article_custom /> can be a good solution to extract what we want everywhere we want (when we don’t need comments, custom fields and so on) and could be authorized in that context.

For my Textpattern CMS websites architectures, I now reduce the use of form templating which saves me each time 1 query by adding the corresponding mechanism directly into my page templates:

<!-- Runtime:    0,0377 -->
<!-- Query time: 0,018757 -->
<!-- Queries: 19 -->
<!-- Memory: 1388Kb, end of textpattern() -->

Generally meaning, what average number of queries is acceptable for a website?

I always use a caching plugin within TXP.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#4 2014-11-22 13:02:23

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Newbie questions

Pat64 wrote #286000:

For my Textpattern CMS websites architectures, I now reduce the use of form templating which saves me each time 1 query by adding the corresponding mechanism directly into my page templates:

That reduces the time spent in queries, but increases the time spent parsing the page due to higher levels of tag nesting. Use forms when it offers advantages in ease of maintenance. Don’t worry about the query time, because it’s not worth it.

Generally meaning, what average number of queries is acceptable for a website?

The number of queries is irrelevant. The total query & page load time is what matters. Optimize that when it becomes noticably high. Premature optimization is the root of all evil

Offline

#5 2014-11-22 13:12:14

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,595
GitHub Twitter

Re: Newbie questions

;)

Hey hey. A private course by Mr. Ruud!


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB