Solved

Question for: TheRealLoki

Posted on 2006-07-13
2
255 Views
Last Modified: 2010-04-05
How would I implement your latest code (Quick Code) into the "Original Code"
That we did here?

Reason:
The original code took over 30-Minutes to process 47,000+ Lines.
Then it's wrapper, which endedded up being a total of 367,000+ lines.

OK. So, as you can tell, that it a LOT of lines.
I was thinking about your code here that you last gave to me.
If there was a way to implement it, getting rid of the:

    CID := StringReplace(Memo3.Lines[i], ' ', ' ',[rfReplaceAll]);
    Con := StringReplace(Memo2.Lines[i], ' ', ' ',[rfReplaceAll]);

And replacing it with something else. (As the   CID & Con   are being used in:)
AdvMemo1.Lines.Add(' <loc>http://somesite.com/content_by_cat3.asp?contentid='+Con+'&catid='+CID+'</loc>');

Thanks a bunch, And as I promised, I will post you a question once I know you are online.

Take Care
Wayne
0
Comment
Question by:Wayne Barron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 500 total points
ID: 17105101
var
  I : Integer;
  starttime: TDateTime;
begin
  i := 0;
  starttime := now;
  memo2.lines.beginupdate;
  memo3.lines.beginupdate;
  AdvMemo1.lines.beginupdate;
  try
    for I := 0 to Memo3.Lines.Count -1 do
    begin
      AdvMemo1.Lines.Add(' <loc>http://somesite.com/content_by_cat3.asp?contentid='+Memo2.Lines[i]+'&#38;catid='+Memo3.Lines[i]+'</loc>');
      if (i > 0) and ( (i mod 100) = 0) then
      begin // only bother checking the time every 100 lines
        if (
             ((starttime + encodetime(0, 5, 0, 0)) < now) or
             ((i mod 1000) = 0)
           ) then
        begin
          inc(timesslept);
          Label3.Caption := 'sleeping  [' + IntToStr(timesslept) + ']';
          Label3.Refresh;
          Panel1.Refresh;
          sleep(10000);
          starttime := now; // reset the timer
          Label3.Caption := 'Processing';
          Label3.Refresh;
          Panel1.Refresh;
        end;
      end;
    end;
  finally
    memo2.lines.endupdate;
    memo3.lines.endupdate;
    AdvMemo1.lines.endupdate;
  end;
end;
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 17105405
Need to add one little update to the code.

Need this

Var
timesslept: integer;
begin

Thank you once again for your help and your great coding experiance.

Wayne
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month11 days, 10 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question