cfront performance

PoweRoy
Member Posts: 43
ive made a program wich reads all the records out of a table. I used a small database (chronus) to test. Now i am trying to open the company database (6gig) and it takes +-2min to read 80000 records. (2min 100%cpu, not much HD activity)
the program is written in C# and the ocx.
in pseudo-code:
while not end of table
{
next record
while not end of record
{
read field for field
}
}
Ive made a similar report in Business Objects and there it takes 35sec to make a report of 2 tables.
Anyone got tips to speed it up with the ocx? Cfront is known to be faster but atm is way slower...
(ill post code if requested)
the program is written in C# and the ocx.
in pseudo-code:
while not end of table
{
next record
while not end of record
{
read field for field
}
}
Ive made a similar report in Business Objects and there it takes 35sec to make a report of 2 tables.
Anyone got tips to speed it up with the ocx? Cfront is known to be faster but atm is way slower...
(ill post code if requested)
0
Comments
-
not requested but still the code ^^
int k = 0; fNumber = 0; do { dRow = dTable.NewRow(); fNumber = cf.NextField(hTable,fNumber); do { /*if (fNumber == 7)//cf.FieldType(hTable,fNumber)==0) { object temp = fNumber; cf.CalcFields(hTable,hRecord, ref temp); }*/ dRow[k] = cf.FieldToStr(hTable, hRecord, fNumber); fNumber = cf.NextField(hTable,fNumber); k++; } while (fNumber != 0); dTable.Rows.Add(dRow); k = 0; fNumber = 0; }while (cf.NextRec(hTable,hRecord, 1) != 0);
the call:cf.ConnectServerAndOpenDatabase("NDBCN","","netb","NLW_NA370_P.fdb",100000,true,false,"*****","*****"); OpenCompany("42 - NLW Techniek"); OpenTable(cf.TableNo("Production BOM Line")); dataGrid1.SetDataBinding(GetRecords(),"");
i tried:
- commenting the addRow (maybe that was slowing => wasnt slowing)
- more/less cache => no difference
- commitcache yes/no => no difference
What are the other things i could try?0 -
Try to use the CFront.dll direct instead of the ocx.
The ocx is a wrapper around CFront.dll
Let us know the results.0 -
tried that
got some topics here on mibuso wich arent answered
problems with reading the data out of a record
Dont think the performance could be better for loading tables cause u have to read each records, field for field. To many operations imho.
would be better if u could read whole records at once!
I've got a copy of Navision 4.0 sp1 now so ill start checking the performance on that.
Cfront is in my opinion good for reading/updating records at a time. not reading 8000> records0 -
yay getting the records with the dll works now in c#
8685 records:
C# + dll = 5sec
C# + ocx = 1.5 minute [-(
Business objects + odbc = 6sec
crystal reports + odbc = 7sec
the workbench (from this site) + odbc = 12sec
C# + odbc = 12 sec
well ocx goes out of the window ^^0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions