On 2013-11-10 13:41, Bastian Bittorf wrote:
> * Felix Fietkau <n...@openwrt.org> [10.11.2013 13:13]:
>> > 3 sec vs. 70 sec...
>> > this was done on a strong board, on a weak board the difference is much 
>> > bigger.
>> > This is only _one_ little optimization, and there are a lot of...
>> For it to matter, I'm more interested in the absolute time saved than
>> relative differences on a completely unrealistic number of iterations.
>> In the case you're describing, it's still only saving about 7 ms per
>> interface-up event, that's not a lot.
> 
> i digged again trough the script and have some ideas:
> 
> 1)
> every script probes if itself is 'enabled', so in
> e.g. /etc/hotplug.d/iface/30-6relay the call is:
> 
> /etc/init.d/6relayd enabled || exit 0
> 
> can we avoid that? maybe if the daemon is disabled
> via '/etc/init.d/6relayd disable', than the hotplug-file
> is also hidden? or netifd/procd should not call daemons
> which are disabled?
We don't have many of those, and there aren't that many calls to
/etc/hotplug.d/iface.

> 2)
> also every script which needs an action has to fork, e.g.
> in '/etc/hotplug.d/iface/50-olsrd' we call
> 
> /etc/init.d/olsrd restart
> 
> maybe we can just source 'rc.common' once in '/sbin/hotplug-call'
> and so we can call just 'restart' when we need it?
I'm not sure it's worth it. The other email you just sent is a lot more
useful wrt. potential for optimization.

- Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to