Yesterday evening after getting home from work, after what seems like three months, because it has been three months of working long days of overtime and weekends on most occasions, I decided to take a quick nap in our ‘Beach Room’ before doing some more work for another client. I lay down on the day bed and remember trying to wake up several times and remember vividly fighting with the sleep of arrays within arrays within arrays. And I had to map the nested arrays to another set of arrays before I could get up. I guess I finally did it by 7am or so as that is when I was able to push through the foggy cloud of arrays and structures in my head and get up. This happens occasionally. When I am working a lot on a problem or a project, it bleeds into my dreams as code. In this case, we have been working on some XML xPath parsing and mappings and it has been a ‘critical’ issue. Happy to report that the real life issue was resolved Tuesday morning by about 5:30am. The issue? A certain size of record processing was taking between 45m to 1.5hrs to process, if and when it finished at all. Most of the time it would fail and kill the server. After effectively rewriting it, the same XML record set now takes 41 seconds to process. Amazing what proper design and proper use of functions will do for you… And the server concurrency issue is negligible (you can put a load on the server while the record set processes and it runs fine).

« »