On Thursday, August 11, 2016 at 12:57:27 AM UTC+3, Dominique Pelle wrote: > Ramel Eshed ]wrote: > > > Hi Bram, > > > > I noticed that using system() function has an overhead of 0.2 seconds > > (checked on RHEL 5.5) while using job_start() is 10 times faster (from > > job_start to close_cb). Is this because of system() is using temp files > > instead of pipes? This is a noticeable delay. > > > > Thanks, > > Ramel > > I'm guessing that system() is slower because it starts a shell process > and that shell process parses and runs the command. The shell may > even run some file like .profile (not sure) before running your command. > > Whereas job_start() is I suppose doing a fork() + exec() (i.e. no shell > process) so it is faster. > > To have more comparable speed, you'd need to measure something like: > > - job_start(["/bin/sh", "-c" "date") > - system('date') > > Dominique
Hi Dominique, job_start(["/bin/sh", "-c" "date") takes almost the same as when using 'date' directly (maybe few ms more). Ramel -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.