#1 2011-05-10 13:29:38

orando
Member
Registered: 2011-05-10
Posts: 2

FTL parser

Dear Ionize,

I have some problems with the FTL parser. It is really slow, the site takes 2 seconds to load on my webserver. Local (using svn) it takes up to 6 seconds to parse. Is there a way to speed this up, or did we do something wrong?

thnx in advance

Offline

#2 2011-05-10 15:26:11

Hypee
Member
From: Paris
Registered: 2010-05-04
Posts: 72
Website

Re: FTL parser

Hi,

How do you get the loading time of your page ? Is it a rough estimation or do you use any benchmarking tool ?
2 to 6 seconds is not a typical rendering time for Ionize, but if you have a bunch of SQL queries or use a module doing some funky process, everything is possible.

I recommend enabling the CodeIgniter profiler:

Edit the /application/controllers/page.php (there's probably a better place to do that, but that will do the trick)
& add a line of code after the "index" function :

function index()
    {
        // Real URI segments : See URI problem below
        $this->uri_segment = func_get_args();

to have

function index()
    {
        $this->output->enable_profiler(TRUE); // Activates the profiler
        
        // Real URI segments : See URI problem below
        $this->uri_segment = func_get_args();

Now when looking at your page in a browser, you should have the rendering time & queries that were launched.
Try it and tell us the results and if you see something wrong.

Regards,

Pascal

Offline

#3 2011-05-10 15:44:00

orando
Member
Registered: 2011-05-10
Posts: 2

Re: FTL parser

I got the 2 to 6 seconds using profiler.

There is no problem, until I get to the parser. The parser takes about 1.4 seconds.

The total of queries is 0.3 seconds.
But we are building a large website, with 3 languages and 3x 80+ pages.

The parser just takes a long fucking time, This is local btw, on a shitty office pc.

Loading Time Base Classes      0.0496
Myconstructor      0.5876
Getconfig      0.0033
Basemodel      0.3153
Parser      9.7926
Controller Execution Time ( Page / Index )      11.6966
Total Execution Time      11.7464

I don't know how to proceed, any tips? I don't feel comfortable posting array's online, if you need extra info, can I email?

Last edited by orando (2011-05-10 15:44:30)

Offline

#4 2011-05-10 16:07:07

Hypee
Member
From: Paris
Registered: 2010-05-04
Posts: 72
Website

Re: FTL parser

Yep, I will need some more info to be able to help.

I understand that you don't want to publish private data on the forum, email is fine.

I'll check what is going on with the parser.

Try to send me enough material to be able to reproduce the problem, essentially the views you use, I will add some fake random content if you don't want to send the database. Remove the design and images if you want to keep them private, just ensure that you still have the problem with what you provide.

Offline

#5 2011-05-11 23:16:56

Michel-Ange
Ionize Core Team
From: Paris, France
Registered: 2010-03-22
Posts: 927
Website

Re: FTL parser

@Orando : Hi and welcome to Ionize !

Which version of Ionize do you use ?
The parser was slow on old versions, but now, it is not.

Do you use alot of "partial" tags in your views ?
So you use "article" tag inside "articles" where it could be improved ?


Inspiration & Innovation : Websites by Partikule, Agence Web Paris

Offline

#6 2011-05-12 23:47:40

Michel-Ange
Ionize Core Team
From: Paris, France
Registered: 2010-03-22
Posts: 927
Website

Re: FTL parser

We done some test on your website with Hypee.
Here is our analyses :
- You use alot of "articles" tags in each view of you website, which generates alot of articles queries.
- Each article you get as result needs to get somme additionnal informations, such all its own URL for each language, list of potential linked media, etc. This generates only one MySQL request per article list, but the internal array filtering wasn't so optimized on the 0.9.5...
- You replaced the Ionize logo : this is the main problem regarding performances. Put it back, and everything will be OK again big_smile

We then made some tests with up to 800 different articles in DB and displaying 350 articles on one page and arrived at the same conclusion : The queries are fast, the parser also, the problem came from internal PHP process.
Upper to 150 articles in DB, and with alot of <ion:articles from="..." /> calls, the system has to check for alot of side data. In this case, there is not secret : You need a cache system.

What we do :
- We replaced some slow functions by faster loops. We had a gain between 15% and 20%. Good, but not enough.
- We added a cache, based on the CI 1.7 cache system. Not perfect, but good.

What we suggest to you :
- Upgrade as soon it will be released to the 0.9.7. For the moment, the last GitHub version we're working on is the branche "with_last_mtfm" : Even the Filemanager isn't working on it, you can start to migrate your views in a "dev" version of your website, so you will be ready when the official one will be available.


Inspiration & Innovation : Websites by Partikule, Agence Web Paris

Offline

#7 2011-05-13 00:29:08

aurex
Member
Registered: 2010-05-02
Posts: 49

Re: FTL parser

what did you say?? a cache system?? cool cool cool

Offline

#8 2011-05-13 13:46:08

Michel-Ange
Ionize Core Team
From: Paris, France
Registered: 2010-03-22
Posts: 927
Website

Re: FTL parser

http://www.ionizecms.com/en/news/first- … for-ionize

Available in the "development" branche of https://github.com/ionize/ionize called "with_last_mtfm".

This is a development branche
So do not complain about the Filemanager : it is currently not working.

If you find other bugs in it, please open issues in GitHub.
The forum is only dedicated to released versions.

Have fun !


Inspiration & Innovation : Websites by Partikule, Agence Web Paris

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations