April 11, 200322 yr In an inventory and invoicing system, I have an invoice with a complex validation script, which is activated by clicking an "add item" button on the invoice This script first checks that data exists in all needed fields, then: -- determines if the number is for a part or a vehicle -- if a vehicle, checks the Vehicles database for a valid number -- checks the Vehicles database to assure that the vehicle remains unsold If the number applied was a part number, the script : --checks a 13,000-record parts database to determine that a valid number has been entered, -- checks that the re-order point has not been reached --checks that the quantity ordered is indeed in stock, (of course the Parts database itself is dependent on the Line Items database to make this determination) When all items pass muster, the numbers and quantities are added to the Line Items database and automatically appear in the Invoice's Line Items portal. All this take about 1.5 seconds on the hosting machine, but takes 3 to 4 MINUTES on the client machines. I can't figure out how to speed this up. Any ideas?
April 12, 200322 yr Author Well, here are some sample validations I'm using: #CHECK FOR A VALID PART NUMBER If [isValid(ValidPart::Part No.)=0].... #CHECK WHETHER A VEHICLE HAS BEEN SOLD If[ Derbi Vehicles Inventory::INSTOCK FLAG="SOLD"].... #CHECK WHETHER SUFFICIENT PARTS EXIST IN INVENTORY If[Derbi Parts Inventory::Quantity - TempQuantity < 0]..... THERE ARE 4 or five similar validations in the script, all written like these. I don't do any Finds.
April 12, 200322 yr Very strange. Did you make a test splitting the script in different sub-script to see which one is slower. It could help identify which relationship is slower than the normal. More than that....
Create an account or sign in to comment