mkschreder / juci

JUCI JavaScript Webgui for embedded devices running OpenWRT
Other
388 stars 107 forks source link

New plugin #84

Closed dbrody2004 closed 3 years ago

dbrody2004 commented 6 years ago

I have a new plugin that works well except for the Apply button. There are a number of settings on this page. The Apply button takes a long time to apply changes and the more changes that are there the longer it takes. What do you think the issue could be?

mkschreder commented 6 years ago

Difficult to say but apply button should work automatically based on the settings that have changed. It will appear when some setting changes in the local uci cache and then submit write requests for all changed values when you hit apply. You could debug the communication and see how write requests are being submitted and if there is some kind of delay associated with each request. That would explain why it takes longer the more settings you need to save.

On Tue, Dec 19, 2017 at 12:40 AM, dbrody2004 notifications@github.com wrote:

I have a new plugin that works well except for the Apply button. There are a number of settings on this page. The Apply button takes a long time to apply changes and the more changes that are there the longer it takes. What do you think the issue could be?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci/issues/84, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqiQaqxI_EJjbgd2s1OQPVsphAQa52ks5tBvfwgaJpZM4RGPUg .

dbrody2004 commented 6 years ago

What's the best way to debug the communications? I replaced the /sbin/uci executable with a script that logs to a file and then executes the original /sbin/uci. That didn't show me much except that I found out that the service is started after everytime a value is changed. So for instance if there are three values to be applied, it sets one value, restarts the service, sets the next one, restarts, the service, etc. These restarts are about 5 seconds in between.

Shouldn't all the changes be applied and the service restarted?

mkschreder commented 6 years ago

Best way to debug communications is to do "/etc/init.d/orange stop" and then to start it like this: orangerpcd -vvvv -p /usr/lib/orange/api

This will dump all communication to stdout.

On Tue, Dec 19, 2017 at 6:50 PM, dbrody2004 notifications@github.com wrote:

What's the best way to debug the communications? I replaced the /sbin/uci executable with a script that logs to a file and then executes the original /sbin/uci. That didn't show me much except that I found out that the service is started after everytime a value is changed. So for instance if there are three values to be applied, it sets one value, restarts the service, sets the next one, restarts, the service, etc. These restarts are about 5 seconds in between.

Shouldn't all the changes be applied and the service restarted?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci/issues/84#issuecomment-352835321, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqiWmFfQIEJqaw4S94Xt-xnk2-9Dryks5tB_eAgaJpZM4RGPUg .