Hi, 

Am Montag 16 Oktober 2006 21:25 schrieb Brandon Black:
> On 10/16/06, Rolf Schaufelberger <[EMAIL PROTECTED]> wrote:
> > and force it to "ignore" this column, but without success.
> > Now I would like to know what is this  column_info_from_storage
> > good for and why does the souce tell, it will be removed in 1.0 ?
>
> column_info_from_storage is something DBIC has done by default for a number
> of versions now.  Basically, if you don't provide the column info yourself,
> it would try to guess it by querying the database itself.  The only way to
> disable this feature was to provide a column info hashref which included
> the key "datatype" (that's why your other two examples didn't succeed in
> disabling it, you needed datatype in there for that to work).

I didn't mention this, but I had data_type=> 'INTEGER' in my column_info too. 
Yet I have no idea, who will use this column_info.Is is it intended to put 
some additional meta data to a column  for use in my application code or ist 
it somewhere used  (needed) in DBIx::Class code ? 

>
> The feature has proved problematic for a lot of edge cases (such as yours),
> so we'd like to kill this feature, but on the other hand we don't want to
> unexpectedly break existing users that might be relying on it in the middle
> of a stable cycle.
>
> As a result, in 0.07002 we added ->column_info_from_storage(0) as a way to
> disable it per-source when you have problems.  In 0.08xxx, the behavior
> will change from defaulting on to default off (that is, if you really want
> it enabled, you'll have to specify ->column_info_from_storage(1)), and in
> 1.0it will finally go away completely.
>
>
>
> Btw. the starting time for my app is now about 2 seconds with 58 tables
>
> > which
> > is ,ehm, a bit slow ...
>
> It used to be even slower.  The profiler will probably tell you a lot of
> time is spent in Class::C3 and Algorithm::C3, which we're slowly working on
> speeding up.  One trick that has helped some in the past is to make a base
> class for all of your sources that loads the components (instead of
> ->load_components(qw/Core/) in every source, they just use base on a shared
> base class that does this).
>
> -- Brandon

I'll give it a try. But should it be faster when I set 
column_info_fom_storage(0) for all of my tables ?

Rolf 

[EMAIL PROTECTED]


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to