DOS Interfacing (Part II)
Reader's Clinic - Preventing Records Being Amended
How Indexes Are Updated
A RevTechie Replies - And Miscellaneous Jottings - Mike Pope - Revelation Technologies (UK) Ltd
Caching in on the Frames Array - Mike Pope
QTIPS - Improving the LH_VERIFY Window
Playing with Scan Codes
QTIPS - Compiling Protection Code
QTIPS - Invalid Code and Command
QTIPS - Code/Command Help
Compiling 64K on a Shoestring by Blaise Wrenn (LexStat Systems Ltd)
How Indexes Are Updated
QTIPS - Unexpected/Unwanted Modification Of Record On Write
@ATTACK - @Modal
QTIPS - DOS File Names
DOS Interfacing (Part II)
VERBatim - V116
@ATTACK - @Pri.File
@ATTACK - @Rollout.File
File Variables
How Indexes Are Updated
Index Record Layouts
QTIPS - File Variable of File In SELECT Statement
QTIPS - Amending non-Attached Files
LINEAR HASH FILE STRUCTURES - Part 1
Index Flush
QTIPS - File Handle Structure
QTIPS - DOSTime
VERBatim - V11
@ATTACK - @Backgrnd.Time
@ATTACK - @Index.Time
QTIPS - Time-outs in Windows
Compiling 64K on a Shoestring by Blaise Wrenn (LexStat Systems Ltd)
REVMEDIA Revisted
SecureUser
VERBatim - V25
@ATTACK - @Files.System
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
REVMEDIA Revisted
File Variables
Argument passing - Subroutines and Functions - Mike Pope
RevTech Replies - Mike Pope (RevTech UK Ltd)
Symbol Table Structure
File Variables
LINEAR HASH FILE STRUCTURES - Part 1
QTIPS - File Handle Structure
VERBatim - V86
@ATTACK - @Help.Level
@ATTACK - @Window.Level
Reader's Clinic - Page Marks in Windows

RevMedia FKB

DocumentV3I9A4
TitleVROOM - Doubling MFS Write Speed
KeywordsMFS
BFS
SI.MFS
SPEED
%%SI%%
VROOM
TextWhen developing MFSs it is frequently necessary to check whether the record
being written has changed since it was read FROM disk Traditionally this is
done by saving off the appropriate VARIABLES CHANGING the BFS code to Read
from Write and performing a DIRECT BFS call to access the old record
Whilst this is effective it does mean that every file write needs to
generate a corresponding file read thus doubling file i/o

Developers who have taken the time to examine the !! source code generated
for the ! routines will notice comments relating to the CACHING of records
by the filing system such as

IF OLD FLAG THEN
* If something cached then ID and FILEVAR must match
IF OLD ID EQ @ID THEN
IF OLD FV EQ FILEVAR THEN

When a record is read FROM disk SI MFS caches it in the LABELLED common
area %%SI%% in the variable OLD REC The documented structure of %%SI%% is
as follows

COMMON /%%SI%%/ A B C D OLD REC OLD FLAG OLD FV OLD ID I J L

If OLD FLAG is set to 0 then OLD REC does not contain a record for some
reason (possibly read failure) If it is set to 1 then OLD REC does contain
a record but if set to 2 it does not contain a record as the record read
from disk was new

To avoid the second read at the MFS level it would therefore be possible to
check the OLD FLAG if this check is passed to compare the old id to the
current id then the old filevar to the CURRENT filevar and if all
conditions pass avoid making the extra read and just compare the values in
OLD REC


(Volume 3 Issue 9 Page 5)
[revmedia/copyrigh.htm]

Page last modified: 08/02/03