I created program, that will continuesly check one webpage and check if there are new articles. So I need to know, it is good to use infinitive loop, to continuesly check that webpage? It won't use a lot of my computer?
Infinitive loop?
Page 1 of 15 Replies - 483 Views - Last Post: 14 August 2012 - 12:59 PM
Replies To: Infinitive loop?
#2
Re: Infinitive loop?
Posted 14 August 2012 - 09:35 AM
How often are you planning to check?
If it is every second, then you incur significant enough cpu and network usage. On the other hand if you want to check once an hour or once a day, the cost is fairly low.
If it is every second, then you incur significant enough cpu and network usage. On the other hand if you want to check once an hour or once a day, the cost is fairly low.
#3
Re: Infinitive loop?
Posted 14 August 2012 - 09:37 AM
You'd be much better putting it on a timer to check the site at set intervals, rather than checking a site continuously. Otherwise, you're going to waste a lot of CPU cycles and seriously decrease the overall performance of your machine while it is running. You don't need to check a website multiple times per second anyway, which is what will happen if you just let it run continuously. You'll kill the website's bandwidth by constantly having to respond to your queries.
#4
Re: Infinitive loop?
Posted 14 August 2012 - 12:33 PM
Kilorn is correct. Put your thread on a timer to check, oh I don't know, let's say once every hour. This will save the performance of your machine and still give you updates as you need them. You don't have to go every hour, but you get what I mean 
Don't have it on an infinite loop as this will check several times per second and tank your machine.
Don't have it on an infinite loop as this will check several times per second and tank your machine.
#5
Re: Infinitive loop?
Posted 14 August 2012 - 12:52 PM
This is why RSS was invented.
It's not so bad, I guess, if you use the HEAD request instead of GET.
It's not so bad, I guess, if you use the HEAD request instead of GET.
#6
Re: Infinitive loop?
Posted 14 August 2012 - 12:59 PM
Just for your future searching (knowing English is not your primary language) the correct term is "infinite loop" rather than "infinitive loop". Otherwise, good job
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote








|