View Issue Details

IDProjectCategoryView StatusLast Update
0006275JEDI VCL00 JVCL Componentspublic2015-09-14 13:20
ReporterbazilioAssigned ToAHUser 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.48 
Summary0006275: Very poor performance of JvMemoryData on large datasets
DescriptionWe have heavy application for TJvMemoryData. It have few dynamically JV memorydataset with 100-200 fields and 10-100 rows. During perfoformance tuning of our application we reached following strange behavior of TJvMemory. Direct access via TField of first fields is fast but access to last fields is very slow.
  After investigation I found that the

TJvMemoryData.FindFieldData(Buffer: Pointer; Field: TField): Pointer;
contains very suspicious code

var
  Index: Integer;
  DataType: TFieldType;
begin
  Result := nil;
  if Length(FCopyFromDataSetFieldDefs) > 0 then
    Index := FCopyFromDataSetFieldDefs[Field.Index]
  else
    Index := FieldDefList.IndexOf(Field.FullName);

IndexOf(Field.FullName)!!!!! instead of access through Field.Index/

I wrote very little patch to avoid this.
Test project attached.
Any comments?
TagsNo tags attached.

Activities

2014-04-22 17:42

 

JVMemoryDataTest.zip (11,536 bytes)

AHUser

2014-04-24 22:54

developer   ~0020953

Using Field.Index won't work if you make the CalcField the first field because then Field.Index is off by one. But using "Field.FieldNo - 1" is the solution.

I also made the Open and the CopyFromDataSet much faster. With the change to Field.FieldNo the FCopyFromDataSetFieldDefs array isn't necessary anymore.


Solved in master branch.

Issue History

Date Modified Username Field Change
2014-04-22 17:42 bazilio New Issue
2014-04-22 17:42 bazilio File Added: JVMemoryDataTest.zip
2014-04-24 22:54 AHUser Note Added: 0020953
2014-04-24 22:54 AHUser Status new => resolved
2014-04-24 22:54 AHUser Fixed in Version => Daily / GIT
2014-04-24 22:54 AHUser Resolution open => fixed
2014-04-24 22:54 AHUser Assigned To => AHUser
2015-09-14 13:20 obones Fixed in Version Daily / GIT => 3.48