Re: [Firebird-net-provider] Using a Hashtable between reader.Read() kills performance

2008-11-02 Thread [EMAIL PROTECTED]
What? You mean it's not reading? Ok, I'll explain it in a another way: - uncomment the table.Add code -> it takes 180 s in my case - replace table (which is a Hashtable) by an ArrayList -> it goes down to 50 seconds - remove any "code adding" functionality -> 50 seconds Is it clearer now? If

Re: [Firebird-net-provider] Using a Hashtable between reader.Read() kills performance

2008-11-01 Thread Dean Harding
> object val; > > while( reader.Read() ) > { > for( int j = 0; j < reader.FieldCount; ++j ) > val=reader[j]; > // table.Add(count, val); > ++count; > } It might be that when you don't use val, the optimizer is not executing all of the code, and so

Re: [Firebird-net-provider] Using a Hashtable between reader.Read() kills performance

2008-11-01 Thread [EMAIL PROTECTED]
Results are different with Mono on Windows -> it doesn't get affected by the "hashtable", although in Mono there's a different performance hit -> if you read fields by field name instead of index your speed is slowed down to a half [EMAIL PROTECTED] escribió: > No, I didn't. > > As I told this

Re: [Firebird-net-provider] Using a Hashtable between reader.Read() kills performance

2008-11-01 Thread [EMAIL PROTECTED]
No, I didn't. As I told this is not a *real* production code. What I actually do in the real code is add one object per record, so my sample was right. The problem is why adding to a hashtable kills reader performance... Steve Faleiro escribió: >>> while( reader.Read() ) >>> { >>>

Re: [Firebird-net-provider] Using a Hashtable between reader.Read() kills performance

2008-11-01 Thread Steve Faleiro
>> while( reader.Read() ) >> { >> for( int j = 0; j < reader.FieldCount; ++j ) >>val=reader[j]; >> // table.Add(count, val); >> ++count; >> } while( reader.Read() ) { for( int j = 0; j < reader.FieldCount; ++j ) {

[Firebird-net-provider] Using a Hashtable between reader.Read() kills performance

2008-11-01 Thread [EMAIL PROTECTED]
Hi there, Here I'm trying to save some miliseconds with the Firebird provider (using embedded database!) Well, I've a weird problem and I'd like you to take a look into it. Well, I'm using the following code to read data from a Firebird database: object val; while( reader.Read() )