![]() |
Today ! |
Thread Tools | Search this Thread |
|
|
|
|
Just Cuddly Old Me™
Posts: 1,502
Karma:
|
Hey, Happy Birthday Ken, the birthdays are ringing today around the forums
![]() Vista Business, yeah, i like it, Vista in general that is, Home Basic on the machine as a main OS and Business inside VPC. Using it for my college study.
__________________
blog | flickr | fazyluckers | graphic design forum | graphic design links | The Photo Forum MCP | MCDST | MCTS |
|
|
|
|
|
|
|
Elite Member
Posts: 489
Name: Ken
Karma:
|
Thanks, Ian.
Btw, do you troubleshoot Users of XP? @apk: sorry man, but I'm on no shape to contemplate code today! (too much, erm . . . cake!) ![]() ![]()
__________________
(\__/) (='.'=) (")_(") Last edited by sepulchre; Jun 12, 2008 at 03:24pm. |
|
|
|
|
|
|
|
Just Cuddly Old Me™
Posts: 1,502
Karma:
|
Well, I have the qualification and the knowledge, but still loking for the job to build up experience - so er....yes
![]()
__________________
blog | flickr | fazyluckers | graphic design forum | graphic design links | The Photo Forum MCP | MCDST | MCTS |
|
|
|
|
|
|
|
|
Elite Member
Posts: 489
Name: Ken
Karma:
|
Quote:
![]()
__________________
(\__/) (='.'=) (")_(") |
|
|
|
|
|
|
|
|
Just Cuddly Old Me™
Posts: 1,502
Karma:
|
that's what those qualifications say down there in my sig anyways
![]()
__________________
blog | flickr | fazyluckers | graphic design forum | graphic design links | The Photo Forum MCP | MCDST | MCTS |
|
|
|
|
|
|
|
Elite Member
Posts: 489
Name: Ken
Karma:
|
Well, it says 'Troubleshooting XP' and 'Supporting Users' . . but do you troubleshoot Users as well?
Sorry, just having a little too much fun today.
__________________
(\__/) (='.'=) (")_(") |
|
|
|
|
|
|
|
Elite Member
Posts: 368
Name: The Duke of URL
Karma:
|
Sepulchre...
Get ready to laugh... I just thought of a CHEAP WAY to more speed: Console Mode (DOS commandline/tty type app) instead, of a GUI one. (This is no "major project" that will have 1,000's of users, lol, doesn't have to be "dead solid perfect" either, just fast, for MY needs... (so, that said? I'll do a 'crude console' program - bet it nearly doubles in speed, just on not doing screen device context (Delphi TCanvas object) alone)) The update to the Label's captions for starttime/endtime, plus the status bar? COSTS... I'll be doing away w/ that CPU killer alone, plus the GUI overheads. APK P.S.=> Between THAT, & maybe if I get lucky a tracedebug ASM dump code set I can use for Inline ASM directive usage, especially for its loop engine/active ingredient portion? Yea... it'll work - I bet I can get it down from 2 minutes over 533,000++ entries, down to 1.3 minutes runtime on the same amount! apk
__________________
"I'm Reese: Sgt. TechComVN38416, assigned to protect you - You've been TARGETTED FOR TERMINATION!" Last edited by APK; Jun 12, 2008 at 08:00pm. |
|
|
|
|
|
|
|
Elite Member
Posts: 368
Name: The Duke of URL
Karma:
|
Sepulchre, I was correct...
By going console mode - I literally got a HUGE performance boost & gigantic orders of magnitude speed increase! (W/ some variances - Especially if I cutoff tty console outputs (radical & ugly, & no indicator of progress thru the array of entries from the file... but speed was what I was after, after all, & I got that, bigtime, thru that same cutting down of 1,498,232 lines of non-normalized text data into a 533,000++ lines of text data in my custom HOSTS file)) Down from near 2 minute mark to ONLY 10 seconds, via this code: ================================================== == {COPYRIGHT APK - Alexander Peter Kowalski 06/01/2008 onwards} program APKHostsFileRewriterConsoleModeApp; //Have this down to 11 second runtimes in consolemode/DOS tty mode //(w/ no screen outputs that is (It is slower with them @ around 30 seconds))... apk //MUCH FASTER THAN GUI MODE MODEL WHICH TAKES JUST UNDER 2 MINUTES... apk {$define nodebug} {$STACKCHECKS OFF} {$D-} //will prevent placing Debug info to your code. {$L-} //will prevent placing local symbols to your code. {$O+} //will optimize your code, remove unnecessary variables etc. {$Q-} //removes code for Integer overflow-checking. {$R-} //removes code for range checking of strings, arrays etc. {$S-} //removes code for stack-checking. USE ONLY AFTER HEAVY TESTING ! {$Y-} //will prevent placing smybol information to your code {$H-} //Forces ShortString usage (no heap usage) until password routine... apk {$APPTYPE CONSOLE} uses SysUtils, StrUtils, Windows; //I eliminated the "uses" dependency on the Forms class object units by NOT using Application.Handle //& instead stepping right down to the clean Win32 API code again for ProcessID + ProcessHandle //To be able to set this application's parent thread to REALTIME CPU Usage & also its child //thread (1 of 2) active to realtime when/if needed too... apk {$H-} var Ch: ShortString; F1:TextFile; F2:TextFile; Flags:TReplaceFlags; Counter:Integer; ThreadHandle: THandle; ProcessID: DWORD; ProcessHandle: THandle; begin; ProcessID:= GetCurrentProcessID; ProcessHandle:= OpenProcess(PROCESS_SET_INFORMATION, false, ProcessID); SetPriorityClass(ProcessHandle, REALTIME_PRIORITY_CLASS); ThreadHandle:= GetCurrentThread; SetThreadPriority(ThreadHandle, THREAD_PRIORITY_TIME_CRITICAL); //--------------------------------------- //"ACTIVE INGREDIENT"/ENGINE HERE: //--------------------------------------- try Counter:=0; AssignFile(F1, 'HOSTSFromFranceToInsert.txt'); Reset(F1); AssignFile(F2, 'B:\HOSTS\NewNormalizedFinalMinusTrailingBlanksNEW EST.txt'); Rewrite(F2); //Blanks it out, so no need for FileUtils unit If FileExists stuff... apk writeln(F2, Trim('Start Time = ' + Trim(TimeToStr(Now)))); while not Eof(F1) do begin Try Counter:=Counter+1; Readln(F1, Ch); //writeln(IntToStr(Counter)); (GOOD FOR DEBUG, BUT, WRITES TO CONSOLE SCREEN slows execution to 40 seconds... apk} //clrscr; {Nice for seeing it on same line updating, rather than row after row... apk} Ch:= StringReplace(Ch, '127.0.0.1 ', '0.0.0.0 ', Flags); //vs. Spybot inserts of 127.0.0.1(TAB)URL{cr+lf} Ch:= StringReplace(Ch, '127.0.0.1', '0.0.0.0', Flags); Ch:= ReverseString(Ch); //StrRev C/C++ equivalent... apk Ch:= StringReplace(Ch, ' ', '', Flags); Ch:= ReverseString(Ch); Ch:= StringReplace(Ch, '0.0.0.0', '0.0.0.0 ', Flags); Ch:= StringReplace(Ch, '0.0.0.0 ', '0.0.0.0 ', Flags); //Still considering a FOR loop here 1-4 interations... apk Ch:= StringReplace(Ch, '"', '', Flags); Ch:= StringReplace(Ch, '"', '', Flags); Ch:= StringReplace(Ch, '"', '', Flags); Ch:= StringReplace(Ch, '"', '', Flags); //This extra FINALLY costs me around 3-5 seconds too, but worth it for data commit integrity... apk finally Writeln(F2, Trim(Ch)); end; //--------------------------------------- //USING EXCESSIVE TRIMS, THOUGH GOOD FOR CODE SECURITY & DATA INTRGRITY TO AN EXTENT, SLOWS RUNTIME //Up to 24 second levels, via lines much like this one below as an example: //Ch:= StringReplace(Trim(Ch), Trim('0.0.0.0'), '0.0.0.0 ', Flags); //Ch:= StringReplace(Trim(Ch), Trim('127.0.0.1'), Trim('0.0.0.0'), Flags); //Ch:= StringReplace(Ch, Trim('"'), '', Flags); //--------------------------------------- end; //writeln(F2, Trim('End Time = ' + Trim(TimeToStr(Now)))); writeln(F2, 'End Time = ' + TimeToStr(Now)); //writeln(F2, Trim('Records Processed = ' + Trim(IntToStr(Counter)))); writeln(F2, 'Records Processed = ' + IntToStr(Counter)); CloseFile(F2); Flush(F2); //clear memory buffer for output file... apk CloseFile(F1); Flush(F1); //clear memory buffer for input file... apk except //CUSTOM EXCEPTION ABEND/ERR HANDLER I CREATED... apk begin CloseFile(F2); Flush(F2); //clear memory buffer for output file... apk CloseFile(F1); Flush(F1); //clear memory buffer for input file... apk exit; end; end; end. ================================================== == apk
__________________
"I'm Reese: Sgt. TechComVN38416, assigned to protect you - You've been TARGETTED FOR TERMINATION!" Last edited by APK; Jun 28, 2008 at 10:52pm. |
|
|
|
|
|
|
|
Elite Member
Posts: 669
Name: nick
Karma:
![]()
|
I shot a couple of troubled XP users today.
![]()
__________________
My Opera Blog |
|
|
|
| Thread Tools | Search this Thread |