Ramel Eshed wrote: > > > There is another (minor) issue I noticed; Because I had problems with > > > the close_cb (I got out-callbacks after it was called) I started a > > > timer to 200ms so I'll be able to know when it's safe to cleanup. I'm > > > not sure if it is still needed, however I see that when running in the > > > terminal the timer callback is called almost immediately as expected, > > > but in the gui it takes more than 2 seconds from when the timer starts > > > until I get the callback. Any idea why? > > > > I did a simple timer setup and in my GUI it works like in the terminal. > > This is on Unix. > > > > function! Done(timer) > > echomsg "Done" > > endfunction > > > > call timer_start(200, 'Done') > > > Please try this: > > func! Close_cb(channel) > let g:rt = reltime() > call timer_start(200, 'Timer_cb') > endfunc > > func! Timer_cb(timer) > echo reltime(g:rt) > endfunc > > call job_start('ls', {'close_cb': 'Close_cb'})
OK, that I can reproduce, in the GUI the timer is only invoked after 'updatetime'. > > > Also, did you have a chance to check the two quickfix issues from the > > > first message? > > > > Which ones are that? This thread has gotten a bit long. Is this about > > parsing errors line by line? I was wondering if ":caddexpr" comes > > close. Perhaps we should have a function for this. > > > In my plugin I'm doing the message parsing manually, then I'm using > setqflist() to add the results to the list. The problems I mentioned > are quoted in Yegappan's response. I think we should do profiling to find out why it's slow. Guessing often leads to optimizing code that isn't the bottleneck. Search for PROFILING in src/Makefile for hints. Otherwise, you could check if setting the quickfix list, instead of appending to it, makes any difference. -- How To Keep A Healthy Level Of Insanity: 18. When leaving the zoo, start running towards the parking lot, yelling "run for your lives, they're loose!!" /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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.