Hi, thanks, the loop looks much better for me, i haven't tested it yet, i will try it at weekend. > For plugin developers, I suggest to keep it simple in there. Its > probably a good idea to tr() the string just once and cache it afterwards. this would be a nice change in the streamdev plugin. Greets J?rg On Tuesday 14 November 2006 19:26, Udo Richter wrote: > J?rg Wendel wrote: > > a question about the 'new' vdr shutdown handling implemented a few > > versions ago. [..] > > But why vdr call this so often, isn't it only required if the vdr is > > going to shutdown? Even without the log message, at first view it looks > > like unnecessary load? > > VDR calls this function together with several other activity checks in > its main loop, and not just when no user activity was detected for the > configured time. > This call is done on each cycle of the main loop (typically once a > second, sometimes more often) unless there's an open OSD, a recording, > or a cutting in progress. > > If this call is used as a simple boolean check, the load is very small. > Translating a string on each call is more serious. And dumping to syslog > should definitely be avoided. > > For plugin developers, I suggest to keep it simple in there. Its > probably a good idea to tr() the string just once and cache it afterwards. > > For VDR, the two if's in the inactivity shutdown should be swappable > with no serious side effects, see attached diff. All the calls do noting > important, except the cCutter::Active() call, and this one is called > often enough in other situations. But even with this patch, an > non-interactive idle VDR waiting for shutdown will call this very > frequently. > > Cheers, > > Udo