Page 1 of 1

Why API Is Too Slow

Posted: Mon Oct 15, 2012 2:41 am
by Knight
hi I'm using API Php Class But I want to know why api is too slow why it is not like winbox

it's take long time to disable,enable,add or remove

for example i have 600 user on rb750gl i can enable and disable all users but it's take long time may be 5 minutes
or more

but via winbox just seconds

this is my class
http://wiki.mikrotik.com/wiki/API_PHP_class

thanks

Re: Why API Is Too Slow

Posted: Mon Oct 15, 2012 12:35 pm
by boen_robot
If you're doing multiple enable/disable/remove commands, that's to be expected.

To make it more efficient, you should collect all IDs in a comma separated list, and execute a single enable/disable/remove command with all of them.

Winbox is more efficient because by the time you hit the "enable/disable/remove" button, the comma separated list has already been gathered (with each click on an entry), and only that single command is issued.

Re: Why API Is Too Slow

Posted: Mon Oct 15, 2012 2:48 pm
by Knight
thanks, you are right.
your suggest solved my problem

Re: Why API Is Too Slow

Posted: Thu Mar 24, 2022 6:46 pm
by aboshhab
If you're doing multiple enable/disable/remove commands, that's to be expected.

To make it more efficient, you should collect all IDs in a comma separated list, and execute a single enable/disable/remove command with all of them.

Winbox is more efficient because by the time you hit the "enable/disable/remove" button, the comma separated list has already been gathered (with each click on an entry), and only that single command is issued.
can you please explain to me more
.
or give me just example, buz i suffering from slow api

Re: Why API Is Too Slow

Posted: Thu Mar 24, 2022 6:50 pm
by rextended
This is unuseful, the user left MikroTik forum on 2019,
very bad habit to resurrect old topic from 10 years ago...

Re: Why API Is Too Slow

Posted: Thu Mar 24, 2022 11:18 pm
by aboshhab
This is unuseful, the user left MikroTik forum on 2019,
very bad habit to resurrect old topic from 10 years ago...
sorry
advice me what should i do

Re: Why API Is Too Slow

Posted: Fri Mar 25, 2022 7:36 am
by Jotne
No reply to an 10 year post...

And do not quote the whole post above you. Not a good habit as well.
Use the green Post Reply button under the the post to reply some.
When there are post inn between, you can quote a post, but pick only what you reply to.