B
B
Bur Ov2015-12-17 16:43:52
In contact with
Bur Ov, 2015-12-17 16:43:52

Script optimization or switching to another language?

There is a script that takes tokens from the database and executes a request to api vk on it. I did it for myself, there were 5-10 tokens, the script was executed instantly. Now about 2k+ tokens, the script runs for about 3-4 minutes.
GgCode:
//deleted
The script twitches every 5 minutes while it is being executed, it needs to be twitched again (
How to optimize it so that it runs faster? Or switch to another AP? If it is more rational to switch, then which one?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Melkij, 2015-12-17
@burov0798

How do you think switching to another language will help you if you are waiting for a network operation about 99% of the time?
In a simple case, use curl_multi.

E
Evgeny Svirsky, 2015-12-17
@e_svirsky

And why pull the call to vk in the while loop?
Does this need to be done synchronously?
YAP is irrelevant here. Apparently, VKontakte is kicking, or rather, there may be some limits on circulation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question