Hi Loy,
This extreme difference is because of the caching VFP does in this case. If we adjust the RDD in X# to also keep the data in memory instead of reading it always from disk, of course the speed will be also greatly improved.
But still, indeed there's a relatively large difference also without this caching. Some of that, I am sure it is because X# is managed code, while VFP uses pure Win32 file access etc, also X# works in a unicode environment while VFP doesn't, so some (larger or smaller) speed difference will always exist, it's the price to pay for having otherwise general progress. I mean for example the Windows OS is A LOT slower than what MS DOS was 25 years ago, but that does not mean anybody (well, almost anybody ) would want to go back to the DOS days...
speed of LOCATE command in X# vs VFP
speed of LOCATE command in X# vs VFP
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
speed of LOCATE command in X# vs VFP
Loy,
This XSharp example takes just under 2 minutes on my computer. The same example in VO runs for 4 seconds. This is, of course, a huge difference. I would even say unacceptable.
P.S. If you redirect the file stream into memory in XSharp, then the example takes 8 seconds.
Best regards,
Leonid
This XSharp example takes just under 2 minutes on my computer. The same example in VO runs for 4 seconds. This is, of course, a huge difference. I would even say unacceptable.
P.S. If you redirect the file stream into memory in XSharp, then the example takes 8 seconds.
Best regards,
Leonid
Best regards,
Leonid
Leonid
speed of LOCATE command in X# vs VFP
At the moment, I have already managed to transfer a large amount of code from VO to XSharp and there is already one small fully working application that has been sent to production. Therefore, I can already conclude about the performance of XSharp (managed) vs VO (native). There are sections of code that work in a comparable manner, and there are sections that work 30% slower in XSharp compared to VO. But there are even some that now work faster in a new (transported) application. But for this, I made changes to the code, bringing it closer to a more appropriate NET environment. In total, the application works at an acceptable speed, not much worse than in VO. And its separate functionality is even more stable and faster than in VO.
At the same time, my team and I received:
- modern development environment (Visual Studio 2019)
- powerful NET language XSharp
- improved teamwork with projects via git (built into VS)
But, again, the 30x difference between VO and XSharp in this particular example you gave is unacceptable. I think we need to ask the XSharp team to deal with this problem in the XSharp RDD subsystem.
Best regards,
Leonid
At the same time, my team and I received:
- modern development environment (Visual Studio 2019)
- powerful NET language XSharp
- improved teamwork with projects via git (built into VS)
But, again, the 30x difference between VO and XSharp in this particular example you gave is unacceptable. I think we need to ask the XSharp team to deal with this problem in the XSharp RDD subsystem.
Best regards,
Leonid
Best regards,
Leonid
Leonid
speed of LOCATE command in X# vs VFP
So the case is different in VFP/X#, it looks like VO/X# performs a little bit better.
I tried to redirect the file stream into memory in VFP/X# and the difference is not much (minus 2-3 seconds).
I don't use VO/X# so I can't compare.
I tried to redirect the file stream into memory in VFP/X# and the difference is not much (minus 2-3 seconds).
I don't use VO/X# so I can't compare.
speed of LOCATE command in X# vs VFP
Loy,
I ran your example in XSharp exactly as you did with the VFP dialect enabled. I uncommented the line
and this example in my VFP/X # completed in 8 seconds.
And only later I wondered how it would work in VO and ran this test in VO too.
Best regards,
Leonid
I ran your example in XSharp exactly as you did with the VFP dialect enabled. I uncommented the line
Code: Select all
FConvertToMemoryStream(DbInfo(DBI_FILEHANDLE))
And only later I wondered how it would work in VO and ran this test in VO too.
Best regards,
Leonid
Best regards,
Leonid
Leonid
speed of LOCATE command in X# vs VFP
Hmmm, yours is faster at 8 seconds? Is this the "SKIP" example? or the "LOCATE" example. The 8 seconds for me is the "LOCATE" example.
But on the "SKIP' example, see my attached screenshot here with FConvertToMemoryStream(DbInfo(DBI_FILEHANDLE)) enabled.
But on the "SKIP' example, see my attached screenshot here with FConvertToMemoryStream(DbInfo(DBI_FILEHANDLE)) enabled.
- Attachments
-
- screen.JPG (40.25 KiB) Viewed 650 times
speed of LOCATE command in X# vs VFP
Loy,
With FConvertToMemoryStream(DbInfo(DBI_FILEHANDLE)) enabled my results (your tests) are as follows
LOCATE: 1 sec
SKIP: 8 sec
If FConvertToMemoryStream(DbInfo(DBI_FILEHANDLE)) disabled (commented) my results (your tests) are as follows
LOCATE: 8 sec
SKIP: ~2 min
With FConvertToMemoryStream(DbInfo(DBI_FILEHANDLE)) enabled my results (your tests) are as follows
LOCATE: 1 sec
SKIP: 8 sec
If FConvertToMemoryStream(DbInfo(DBI_FILEHANDLE)) disabled (commented) my results (your tests) are as follows
LOCATE: 8 sec
SKIP: ~2 min
- Attachments
-
- Test 2020-08-18 202442.png (63.31 KiB) Viewed 650 times
Best regards,
Leonid
Leonid
speed of LOCATE command in X# vs VFP
I forgot to mention that I have 1000 records in my TEMP.DBF. When I reduced this to 100 records, I have the same result as yours.
speed of LOCATE command in X# vs VFP
Loy,
My temptab.dbf file has two fields ([SERIES] N,8 and [NAME] C,100) and 1000 records.
My temptab.dbf file has two fields ([SERIES] N,8 and [NAME] C,100) and 1000 records.
- Attachments
-
- temptab.dbf.rar
- (2.92 KiB) Downloaded 83 times
Best regards,
Leonid
Leonid
speed of LOCATE command in X# vs VFP
Guys, as Robert said, this problem is indeed already acknowledged and will be looked at!
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu