Hey Julien,
took me almost a month to get to it, but finally I got around looking at
your patch and testing it on a VM. For the little I understand, code
changes look good to me and initial testing on the VM is positive, time to
load is greatly reduced. I will deploy to a small lab (about 10 machines)
this week and see if anybody complains :)
take care,
Spike
On Mon, Nov 7, 2016 at 11:20 AM Julien Lavergne <julien.laver...@gmail.com>
wrote:
> Hi,
>
> 2016-10-11 18:29 GMT+02:00 Spike <sp...@drba.org>:
> > for future reference in case it helps anybody stumbling into this
> thread, I
> > found the problem altho I'm not sure of what a clean solution is and that
> > it's worth investing into since it will only really cause a problem if
> your
> > home is on NFS or a slow drive (this is going to be true for raspberry
> pis
> > tho, so maybe worthwhile there).
> >
> > This is basically where the problem is on_update_string_set():
> >
> https://github.com/lxde/lxsession/blob/master/lxsession/settings.vala#L960
> >
> > this is what happens:
> > - main creates a config object LxsessionConfigKeyFile
> > - in the constructor LxsessionConfigKeyFile calls read_keyfile(), which
> is
> > reading the global and user desktop.conf to merge them and set defaults
> > - for each allowed setting,which is listed in read_keyfile, this calls
> > read_key_value which populates the in memory structure for the config
> file
> > kf.
> > - Populating the in memory structure is done by set_config_item_value and
> > this is where on_update_generic is called.
> > - in on_update_generic the specific type function is called, our culprit,
> > on_update_string_set.
> > - here save_keyfile is called which uses FileUtils.set_contents
> > - looking at the manual, FileUtils.set_contents does "atomic" saves which
> > means a temp file is created and then moved.
> >
> > This means that for every single setting in desktop.conf a temp file is
> > created and then renamed to desktop.conf.
> >
> > Obviously this is not a desirable behavior and the file should be written
> > only once after the in-memory structure has been populated.
> >
> > I don't know enough vala/lxde to understand where the right place is, but
> > hopefully this can help somebody put together a patch.
> >
>
> Thanks a lot for tracking this bug. Yes, this is not really expected
> ... I made some tests with the patch attached, it reduces the number
> of lxsession desktop occurrence in the strace to 7 (instead of 260).
> So far, I didn't catch any regression, but I'll be very happy if you
> can test the patch included, before I push it to git.
>
> Thanks in advance.
>
> Regards,
> Julien Lavergne
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Lxde-list mailing list
Lxde-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxde-list