Hello everyone,
I did some changes for VFP Advanced,
I think FoxPro will be faster for some moving record pointer commands.
There are some test results:
VFPTEST.DBF: 62,200 KB
RECCOUNT(): 158,000
LOOP COUNT: 100
-------------------------------------------------------------------------------------------------------------------------------------
| SYS(9900,9080-9083) Functions | Disable | Enable | Rate |
-------------------------------------------------------------------------------------------------------------------------------------
| SYS(9900,9080,0|1) - Enables or disables fast GOTO TOP command. | | | |
| INLIST(CURSORGETPROP("Buffering"),1,2,3) AND ORDER()=="" | 14 | 0.03 | 466 : 1 |
| INLIST(CURSORGETPROP("Buffering"),1,2,3) AND !ORDER()=="" | 13 | 0.4 | 32 : 1 |
| INLIST(CURSORGETPROP("Buffering"),4,5) AND ORDER()=="" | 15 | 0.05 | 300 : 1 |
| INLIST(CURSORGETPROP("Buffering"),4,5) AND !ORDER()=="" | 31 | 0.4 | 77 : 1 |
-------------------------------------------------------------------------------------------------------------------------------------
| SYS(9900,9081,0|1) - Enables or disables fast GOTO BOTTOM command. | | | |
| INLIST(CURSORGETPROP("Buffering"),1,2,3) AND ORDER()=="" | 9 | 0.2 | 45 : 1 |
| INLIST(CURSORGETPROP("Buffering"),1,2,3) AND !ORDER()=="" | 12 | 0.4 | 30 : 1 |
| INLIST(CURSORGETPROP("Buffering"),4,5) AND ORDER()=="" | 0.03 | 0.03 | 1 : 1 |
| INLIST(CURSORGETPROP("Buffering"),4,5) AND !ORDER()=="" | 31 | 0.4 | 77 : 1 |
-------------------------------------------------------------------------------------------------------------------------------------
| SYS(9900,9082,0|1) - Enables or disables fast LOCATE command. | | | |
| INLIST(CURSORGETPROP("Buffering"),1,2,3) AND ORDER()=="" | 0.02 | 0.02 | 1 : 1 |
| INLIST(CURSORGETPROP("Buffering"),1,2,3) AND !ORDER()=="" | 0.6 | 0.4 | 1.5 : 1 |
| INLIST(CURSORGETPROP("Buffering"),4,5) AND ORDER()=="" | 0.04 | 0.04 | 1 : 1 |
| INLIST(CURSORGETPROP("Buffering"),4,5) AND !ORDER()=="" | 20 | 0.4 | 50 : 1 |
-------------------------------------------------------------------------------------------------------------------------------------
| SYS(9900,9083,0|1) - Enables or disables fast SKIP command. | | | |
| INLIST(CURSORGETPROP("Buffering"),1,2,3) AND ORDER()=="" (SKIP +10) | 13 | 0.4 | 32 : 1 |
| INLIST(CURSORGETPROP("Buffering"),1,2,3) AND !ORDER()=="" (SKIP +10) | 6 | 1.2 | 5 : 1 |
| INLIST(CURSORGETPROP("Buffering"),4,5) AND ORDER()=="" (SKIP +10) | 15 | 0.5 | 30 : 1 |
| INLIST(CURSORGETPROP("Buffering"),4,5) AND !ORDER()=="" (SKIP +10) | 15 | 1.3 | 11 : 1 |
| INLIST(CURSORGETPROP("Buffering"),1,2,3) AND ORDER()=="" (SKIP -10) | 9 | 0.6 | 15 : 1 |
| INLIST(CURSORGETPROP("Buffering"),1,2,3) AND !ORDER()=="" (SKIP -10) | 1.5 | 0.8 | 2 : 1 |
| INLIST(CURSORGETPROP("Buffering"),4,5) AND ORDER()=="" (SKIP -10) | 10 | 0.6 | 16 : 1 |
| INLIST(CURSORGETPROP("Buffering"),4,5) AND !ORDER()=="" (SKIP -10) | 30 | 1.0 | 30 : 1 |
-------------------------------------------------------------------------------------------------------------------------------------
Usually, the LOCATE command can use Rushmore Query Optimization,
but it seems there are some problems if INLIST(CURSORGETPROP("Buffering"),4,5) AND !ORDER()=="".
In Visual FoxPro 9.0 and earlier versions, the GOTO TOP command, the GOTO BOTTOM command, and the SKIP command, these commands can't use Rushmore Query Optimization.
Now in VFP Advanced, these commands can use Rushmore Query Optimization, so they will run faster.
Best regards,
Chen