berto
Posts: 20708
Joined: 3/13/2002 From: metro Chicago, Illinois, USA Status: offline
|
quote:
ORIGINAL: berto quote:
ORIGINAL: berto I am finally reviewing the bridge laying stuff, all aspects, including graphics. In the course of this, I am generating tons of log entries at higher logging levels. Finally, too, I went to the trouble of downloading, installing, and making use of RAMdisk software. This is speeding up the reads/writes of log files tremendously, not to mention saving wear and tear on my physical hard drives. (BTW, I tried using AMD Radeon RAMDisk, but the most recent Windows 10 Creators Update broke it. So instead I am using ImDisk, which so far appears to be working well enough.) Now, in all cases, by means of the -R command-line option, I am writing engine and editor log files to the ramdisk: rober@Rob10rto /cygdrive/c/Games/Matrix Games/Middle East/middle_east $ ./Middle\ East.exe -R When the launcher calls the game engine, the -R option is passed along to the me.exe too. And so on. Using the ramdisk is now SOP for me. I have set this (ImDisk) up for a 8 GB ramdisk: rober@Rob10rto /cygdrive/c/Games/Matrix Games/Middle East/middle_east $ df -h Filesystem Size Used Avail Use% Mounted on C:/cygwin64 918G 205G 713G 23% / E: 3.7G 3.7G 0 100% /cygdrive/e F: 2.0T 386G 1.7T 19% /cygdrive/f G: 1.7T 461G 1.2T 28% /cygdrive/g R: 8.0G 44M 8.0G 1% /cygdrive/r Thus far, the largest log files I have generated are ~1/2 GB in size. Not only is the writing of log files to the ramdisk much faster, analyzing those log files is now blazingly fast. Here is a command to count the number of trace calls for various functions: rober@Rob10rto /cygdrive/r/Temp/logs $ egrep TRACE frontend.log | awk -F\( '{print $2}' | awk '{print $NF}' | sed '1,$ s/,//g' | sort | uniq -c | sort -n 2 GetTimelines 2 NoShowFlag 2 SelectScenarioInit 2 SortFileIndexByComplex 2 SortFileIndexByName 2 VictoryFlag 2 XCSound::XCSound 4 DoSorting 4 GetDirDetails 4 GetDirectoryToDisplay 4 SetupScenarioList 6 SwitchMenu 8 ShowMovie 32 LoadScenarioPicture 34 OnLButtonDown 34 OnLButtonUp 60 WriteTextSelectScenario 80 OnPaint 138 OnTimer 636 CheckTextExtent 1092 GetDateValue 1092 LoadScenarioThumbnail 1092 SetHistoricalData 5198 Swap 13242 Trim 553020 StringIsLess That is, feed the frontend.log -- in this case, ~7 MB in size -- to a series of 7 piped utilities (egrep, awk, sed, sort, uniq, ...; where one utility's output is input for the next utility in the sequence). When I execute such a command, I see results very quickly, in this case in the blink of an eye. Imagine: Processing over 7 million characters of log entries, passing through 7 different Unix (Cygwin) utilities, in the fraction of a second!
_____________________________
|