What is the fastest way to download webpage source into a memo component? I use Indy and HttpCli components.
The problem is that I have a listbox filled with more than 100 sites, my program downloads source to a memo and parses that source for mp3 files. It is something like a Google music search program; it uses Google queries to make Google search easier.
I started reading about threads which lead to my question: Can I create a IdHttp instance in a thread with parsing function and tell it to parse half of the sites in the listbox?
So basically when a user clicks parse, the main thread should do:
for i := 0 to listbox1.items.count div 2 do
get and parse
, and the other thread should do:
for i := form1.listbox1.items.count div 2 to form1.listbox1.items.count - 1 do
get and parse.
, so they would add parsed content to form1.listbox2
in the same time. Or is it maybe easier to start two IdHttp instances in the main thread; one for first half of sites and other for second?
For this: should I use Indy or Synapse?