Hi,

I'm developing an app with Catalyst 5.80024, on perl 5.8.8, 32 bits; DBIx::Class models.

I have used the exact same environment to develop other apps and didn't find performance problems, but now I do. The other applications were based on a simple local-running MySQL schema, with few tables (<20). This new one has two schemas, one is local, mysql based and < 20 tables; the other is remote, Oracle based and pretty much bigger: 125 tables. All schemas are static and classes generated by Schema::Loader.

I experienced very bad performance: index pages loading in 30 seconds or more, and Catalyst reporting that the request took 40s and the like. Completely unbearable.

After installing Devel::NYTProf and profiling my app, NYTProf showed that about 45% (!!!!) of the time was spent in the sub Class::C3::_calculate_method_dispatch_table. Knowing that there's a XS module for speeding the C3 module, I install Class::C3::XS which Class::C3 loads and uses if available.

With that I managed to push the time in _calculate_method_dispatch_table (now it's using the Class::C3::XS version), to some 17%. Indeed high, but somehow more useful than before.

After that, I began suspecting of the great number of classes loaded by the Oracle schema (of which I'm using only a few: it's been autogenerated). So I pruned the Schema directory, only leaving the classes I use.

Now the app behaves smoothly, requests take less than 1 second (test setup), and the NYTProf report shows that no sub execution time dominates over the rest. So my problem seems solved.

My questions/comments:

- Has anyone stepped over this performance problems before?
- Has DBIx::Class  scalability problems beyond a given number of tables?
- My perl (5.8.8) is a bit old (comes with Centos 5), could this issues be solved in later versions of perl? I know C3 is integrated in basee perl in latest versions...
- What if I need an app to handle >100 tables?

Regards
J.

--

Jorge González Villalonga
Director Técnico


DAIKON Integración y Desarrollo S.L.
Telf: (+34) 91 188 08 28
Fax: (+34) 91 632 65 42
www.daikon.es
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to