OK, so I survived my adventure with the endless loop, and Craig helpfully explained some of the process behind Cirrus' handling of File Formats. So I happily go back to working on my Apache File Format...
The first action of course is to replace that brilliant regex with one that does not match an empty string, but actually matches a path. To my utter surprise it still looks as though it's looping - but it's not: it just takes an extraordinary much longer time to "build" the grammar than without that Grammar item. I try to refine it a bit, but that doesn't help.
So, I take it out, and go on to add other Grammar items I'll need. Building times go back to what is normal on my admittedly old machine. Following Craig's hint, I've now turned "off" my Apache FF, so loading a text compare will initially use <default>; then I switch to Apache from the "guy-with-a-cap" button to see the actual building time. Looking at Task Manager during the process, you can sort of follow what's happening; Attachment 1 shows a typical sequence:
While loading time is a bit longer (as expected) than before I added my new collection of Grammar items, but not excessively so. The FF used for this is in the second Attachment (Apache_1.3_20071021_1.zip), and a small test file (just in case you don't have any Apache config files handy) is in Attachment 3 (htaccess.zip). (I was comparing identical files in different directories, but you could just compare it to itself.)
Now, when I add my "Path" Grammar element back (at the end of the FF), suddenly loading time is almost an order of magnitude larger... it took me quite a while to figure out what was happening, though I still don't understand why. Here's what's happening (see fourth attachment for the screenshots, and the fifth (Apache_1.3_20071021_2.zip) for the FF):
continued in next message - running out of attachment slots...
The first action of course is to replace that brilliant regex with one that does not match an empty string, but actually matches a path. To my utter surprise it still looks as though it's looping - but it's not: it just takes an extraordinary much longer time to "build" the grammar than without that Grammar item. I try to refine it a bit, but that doesn't help.
So, I take it out, and go on to add other Grammar items I'll need. Building times go back to what is normal on my admittedly old machine. Following Craig's hint, I've now turned "off" my Apache FF, so loading a text compare will initially use <default>; then I switch to Apache from the "guy-with-a-cap" button to see the actual building time. Looking at Task Manager during the process, you can sort of follow what's happening; Attachment 1 shows a typical sequence:
- Situation just after opening Cirrus: Mem usage and Peak mem usage are identical, and it takes a small amount of Virtual memory as well.
- Now I've started a (Folder compare) session
- After loading an Apache config file for Text comparison - with the <default> FF; then
I switch to my Apache FF, and I gradually see Mem usage and Virtual mem usage rise in parallel, until just over 230,000K (no screenshot) - Finally, when the building and comparison is done, the file shows up with color coding, and the Mem usage and Virtual mem usage both drop down ... only Peak mem usage shows the level it's been to. Total time: 136.19 seconds
While loading time is a bit longer (as expected) than before I added my new collection of Grammar items, but not excessively so. The FF used for this is in the second Attachment (Apache_1.3_20071021_1.zip), and a small test file (just in case you don't have any Apache config files handy) is in Attachment 3 (htaccess.zip). (I was comparing identical files in different directories, but you could just compare it to itself.)
Now, when I add my "Path" Grammar element back (at the end of the FF), suddenly loading time is almost an order of magnitude larger... it took me quite a while to figure out what was happening, though I still don't understand why. Here's what's happening (see fourth attachment for the screenshots, and the fifth (Apache_1.3_20071021_2.zip) for the FF):
- Situation just after starting a new comparison, having switched to Apache again: mem use and Virtual mem use are slightly up, Peak Memory use still shows what it was after the previous comparison; you can also see it's taking a good deal of CPU time (almost as much as it can take)
- Now a series of shots while it's building; in this first one you can see how it's already overshot the previous Peak by quite a bit, but Mem usage and Virtual mem usage are still climbing in parallel, and CPU is quite high;
- But then as Virtual memory usage continues to climb, Mem usage drops and then starts going up and down, while CPU gets quite low: it's now using almost as much Virtual memory as it can get I may actually get warnings about low Virtual memory at this stage): it's thrashing now, so most of its time is spent waiting for new memory blocks to become available; Virtual memory usage actually crept up to over 480,000K
- This is what I saw when building was finally complete, and the comparison became visible: as with the first run (without the "Path" Grammar item), both memory and virtual memory usage suddenly drop - but Virtual memory usage is more than four times as high, and final Peak memory (max Mem it has used) is also quite a bit higher than in the previous run. And loading time was 817.38 seconds.
continued in next message - running out of attachment slots...
Comment