Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-02-01 12:17:30

empiryk
Member
From: Andrychów/Kraków [Poland]
Registered: 2007-01-23
Posts: 43
Website

language/translations vs database load

I am beginner in TXP, then I apologise for this lame question … I noticed, that TXP takes interface language directly from database.
Question: is it connected with additional load of database?


[ I apologize for my poor english ]

Offline

#2 2007-02-01 19:55:46

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: language/translations vs database load

I don’t understand the question.

This is how it works: TXP load XML data for the rpc.textpattern.com server for the language pack, and store it into a MySQL table. Then, when it need it, it will get it from the database (I don’t know if it’s one query per item, cached or not, or if the whole language is loaded in PHP memory and used until PHP release the hand to Apache).

Offline

#3 2007-02-02 08:49:27

empiryk
Member
From: Andrychów/Kraków [Poland]
Registered: 2007-01-23
Posts: 43
Website

Re: language/translations vs database load

Jeremie wrote:

(I don’t know if it’s one query per item, cached or not, or if the whole language is loaded in PHP memory and used until PHP release the hand to Apache).

And this is core of my question: how it works? For example: if on page there is ten (10) language strings – is it equals to ten (10) queries to databese?


[ I apologize for my poor english ]

Offline

#4 2007-02-02 13:09:57

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: language/translations vs database load

AFAIK it loads the entire language into a memory array on startup.


Who’s gonna textdrive you home tonight?

Offline

#5 2007-02-03 01:23:28

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: language/translations vs database load

empiryk

mamash is correct. All of the strings of any one language are loaded into memory via a single SQL query very early in TxP’s processing of a request.


Steve

Offline

Board footer

Powered by FluxBB