Community discussions

MikroTik App
 
Knight
newbie
Topic Author
Posts: 44
Joined: Thu Feb 09, 2012 1:40 am

Why API Is Too Slow

Mon Oct 15, 2012 2:41 am

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
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Why API Is Too Slow

Mon Oct 15, 2012 12:35 pm

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.
 
Knight
newbie
Topic Author
Posts: 44
Joined: Thu Feb 09, 2012 1:40 am

Re: Why API Is Too Slow

Mon Oct 15, 2012 2:48 pm

thanks, you are right.
your suggest solved my problem
 
aboshhab
just joined
Posts: 17
Joined: Tue Nov 20, 2018 9:00 am

Re: Why API Is Too Slow

Thu Mar 24, 2022 6:46 pm

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
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Why API Is Too Slow

Thu Mar 24, 2022 6:50 pm

This is unuseful, the user left MikroTik forum on 2019,
very bad habit to resurrect old topic from 10 years ago...
 
aboshhab
just joined
Posts: 17
Joined: Tue Nov 20, 2018 9:00 am

Re: Why API Is Too Slow

Thu Mar 24, 2022 11:18 pm

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
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3292
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Why API Is Too Slow

Fri Mar 25, 2022 7:36 am

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.

Who is online

Users browsing this forum: Google [Bot] and 19 guests