On Wed, May 19, 2010 at 23:15, James Cameron <qu...@laptop.org> wrote: > I'm unsure of the reasons for the change. > > Instead of setting DISPLAY and SUGAR_EMULATOR_PID environment variables > repeatedly for each attempt to run Xephyr, set the variables once.
But that's what the patch does, moves setting those variables from the loop in _start_xephyr to somewhere close to the end of main(). Bernie has sent another patch that does this same thing. > This would be effective in reducing CPU cost if there is contention in > display numbers. > > Further efficiency during contention could also be gained by factoring > much of _run_xephyr; there are many other steps there that might be done > only once. > > Further readability might be gained by considering _setup_env. It sets > environment variables that will be available to the Xephyr process, > though I can't see a need for them there. Perhaps all environment > variables could be moved there, and the display and pipe passed to it. That sounds good to me. Regards, Tomeu > Not tested. > > Reviewed-by: James Cameron <qu...@laptop.org> > > -- > James Cameron > http://quozl.linux.org.au/ > _______________________________________________ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel > _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel