Jim Carr Posted April 11, 2003 Posted April 11, 2003 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?
Ugo DI LUCA Posted April 11, 2003 Posted April 11, 2003 Hi, Are your script using "classic finds" or "relationships".
Jim Carr Posted April 12, 2003 Author Posted April 12, 2003 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.
Ugo DI LUCA Posted April 12, 2003 Posted April 12, 2003 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....
Recommended Posts
This topic is 7900 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now