[Mono-dev] Patch forSystem.Data.Mono.Data.ColumnExpression

Boris Kirzner borisk at mainsoft.com
Mon Jan 16 12:54:34 EST 2006


Hello Senga,

> can cache the column ordinal instead of the column. we only 
> need a way to index the row.

Caching column ordinal and caching column reference both have the same
level of implementation "complexity and care".
We want to store the following information "this expression relates to
those column", so it looks more natural to store the reference to actual
column than a column ordinal. The same is truth for cached relation as
well.

> hmm..instead of explicitly calling initialize, should invoke 
> it from within the class on first use of the expression.
> that way,  we don't have to remember to explicitly call init 
> everytime the expression is modfied/reset..
> seems to be a cleaner way. also, values are cached only if required.

Yes, you're right. I've removed Initialize() method and changed the
cached column and reference to become lazy evaluated inside
ColumnReference class.  

Attached is the reworked patch.

If no one objects, I'll commit

--
Boris Kirzner
Mono R&D team, Mainsoft Corporation.
Blogging at http://boriskirzner.blogspot.com/  


> > Attached is a proposed patch for ColumnExpression. 
> > The main idea is caching the column and relations used by the 
> > object instead of searching in the data column and relation 
> > collections each time we access ColumnExpression for Eval.
> > 
> > The patch brings slight performance improvement.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: system.data.columnreference.diff
Type: application/octet-stream
Size: 7108 bytes
Desc: system.data.columnreference.diff
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060116/8820c629/attachment.obj 


More information about the Mono-devel-list mailing list