unnecessary check_process calls due to r179870

View: New views
1 Messages — Rating Filter:   Alert me  

unnecessary check_process calls due to r179870

by Jilles Tjoelker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I noticed that r179870 considerably slows down startup on my qemu
virtual machine running on an old box. Reverting it speeds up the
/etc/rc part of the startup by about 30%. This is because with r179870
the check_process or check_pidfile (eval $_pidcmd) is executed even if
the service is not enabled.

It also seems strange that eval $_pidcmd is done even if $rc_fast is
enabled. Skipping the eval if $rc_fast or $rc_quiet are enabled provides
a similar speedup.

One part of check_process that seems particularly slow is the
ps ... -ax | while read loop. Now that pgrep is in /bin it may be faster
to use that.

--
Jilles Tjoelker
_______________________________________________
freebsd-rc@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "freebsd-rc-unsubscribe@..."