I have been Alpha-ing it for some time. Rarely had a performance issue with Alpha that would take more than a few minutes to detect and fix.
Until now.
Environment:
Recent version AppServer. SQL Server on same server, XBasic. Idle server. 6gig, 2-CPUs.
Task:
1. Transaction records have a text field that is populated with a JSON object, normally 1 to 4 reporting topics. <<1k of JSON.
Processing:
1. Select Transactions to a Results Set.
2. Loop through the Results Set
3. Parse the JSON
4. Insert 1 to 4 rows into the Transaction_Issues table.
5. Next Transaction
Easy Peasey. So I thought. IT RUNS LIKE A ONE-LEGGED DOG IN MUD!
2 seconds per Transaction with about 2 Insertions per. I have 30,000 to process. Yikes!
I'd expect 30-60 seconds for the whole load, not 16 hours! Attached image is the CPU chart from Task Manager.
If one of you XBasic hotshots would look into the attached code, maybe you could Bit-Slap me upside the head as to where I might be dogging it?
Is JSON Parse killing me? SQL is faster than snot, so am reluctant to blame it. Portable SQL? Args?
Worse yet, unless I do a Sleep() in the loop, AlwaysUp detects a CPU runaway and will restart the AppServer!
I would image that there is a way to PROFILE for performance, but Alpha has taken such good care of me, I haven't had any rough-and-tumble debugging problems.
I limit the test to 10 rows, and I can watch the CPU spike for 2 seconds per row.
Carl
Dallas
https://www.youtube.com/watch?v=PD9jmXlUMcc <<< Watching this from Brightbill for clues
Until now.
Environment:
Recent version AppServer. SQL Server on same server, XBasic. Idle server. 6gig, 2-CPUs.
Task:
1. Transaction records have a text field that is populated with a JSON object, normally 1 to 4 reporting topics. <<1k of JSON.
Processing:
1. Select Transactions to a Results Set.
2. Loop through the Results Set
3. Parse the JSON
4. Insert 1 to 4 rows into the Transaction_Issues table.
5. Next Transaction
Easy Peasey. So I thought. IT RUNS LIKE A ONE-LEGGED DOG IN MUD!
2 seconds per Transaction with about 2 Insertions per. I have 30,000 to process. Yikes!
I'd expect 30-60 seconds for the whole load, not 16 hours! Attached image is the CPU chart from Task Manager.
If one of you XBasic hotshots would look into the attached code, maybe you could Bit-Slap me upside the head as to where I might be dogging it?
Is JSON Parse killing me? SQL is faster than snot, so am reluctant to blame it. Portable SQL? Args?
Worse yet, unless I do a Sleep() in the loop, AlwaysUp detects a CPU runaway and will restart the AppServer!
I would image that there is a way to PROFILE for performance, but Alpha has taken such good care of me, I haven't had any rough-and-tumble debugging problems.
I limit the test to 10 rows, and I can watch the CPU spike for 2 seconds per row.
Carl
Dallas
https://www.youtube.com/watch?v=PD9jmXlUMcc <<< Watching this from Brightbill for clues
Comment