Jump to content

Is there any way to grow my server's grabbing script?


Rayhan420

Recommended Posts

Is there any way to grow my server's grabbing speed.I have made a script that grabs contents from another site.but my server's grabbing speed is too slow.is there any way to grow the speed.i am using shared hosting.so,i don't get that much of support for this.please help

Link to comment
Share on other sites

It depends on where the bottleneck is. If the problem is too much network traffic (which seems likely on a shared host) then there's not much you can do. If it's an issue of processing the results taking too long you may be able to speed it up by optimizing your code.

 

Make sure your code is optimized so it will process results quickly. Do some benchmarks and profiling to determine where your code spends most of its time and see if there is any way to improve that area of code.

 

Attempt to download different pages in parallel to make use of all the bandwidth you have available. You can do this with cURL and there are libraries available to make it easier.

Link to comment
Share on other sites

Example of optimizing my code

 

There are literally hundreds, if not thousands, of way to "optimize" code. It all depends on what your code is specifically doing. If you are running queries in loops - don't. If you are using RegEx try and find string function alternatives, etc. etc. etc. It is a waste of time for us to try and suggest optimizations that may be appropriate for your need without seeing any code.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.