PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I read some article about forking and optimizing the performance. I am writing a program that query the satellite modem's status. It became painful once I realize that there is quarter second delay to reach the host and return the value. On top, I have 255 loops to go through, means big latency. On my old box, it takes more than 10 minutes to finish one iterations. Can somebody help me to adapt either forking to optimize the loop or direct me to other paths. Here is my sample code.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
I know very little about multi-threading and forking actually. I have been programming on PHP for over 5 years, but it was on and off. I am back after nearly 2 years. I do have strategy to use. I will go through the link that s.dot posted. I like John's advice but it is already too late to adapt new language. Ideal help from you guys would be a simple example that is similar to the code I posted.
What is actually different for every iteration (it's not clear from the code you posted)? If it's OID that changes, than you may issue a single request with multiple oids specified and suffer the roundtrip only once.
The last digit of OID will go from 1 to 255. So there will be 255 unique OIDs incrementing last digit from 1. Sorry about the confusion, I copied from working program just to show how I am doing, and asking for better solution.
kumarrana wrote:The last digit of OID will go from 1 to 255. So there will be 255 unique OIDs incrementing last digit from 1. Sorry about the confusion, I copied from working program just to show how I am doing, and asking for better solution.