I think that things like the profile directory location should be
provided to servo by the embedder. There could be a very simple embedder
that fallbacks to a default location based on the platform, and also
accepts overrides from a command line argument, or you could go all
fancy with a profile manager if you want!

        Fabrice

On 12/17/2015 09:55 PM, Josh Matthews wrote:
> ---------- Forwarded message ----------
> From: "Lars Bergstrom" <larsb...@mozilla.com>
> Date: Dec 17, 2015 11:26 AM
> Subject: Re: [dev-servo] Fwd: Profile directory (Re: IndexDB project)
> To: "Josh Matthews" <j...@joshmatthews.net>
> Cc:
> 
> How do you see this (profile stuff) in relation to startup caches? I
> need to implement one really badly for Android font loading (see
> https://bugzilla.mozilla.org/show_bug.cgi?id=623136 for similar gecko
> code) so that our first page load isn't so miserable. I'm happy to put
> it anywhere, but know that this stuff has a tendency to stick
> around... if I hadn't seen your thread, I probably would've just put
> it in a "reasonable" place in the Android app folder. :-)
> 
> On Thu, Dec 17, 2015 at 10:09 AM, Josh Matthews <j...@joshmatthews.net>
> wrote:
>> Right, I know there are expected conventions. My previous suggestion was
> an
>> attempt to provide a mechanism to allow testing persistence between
> sessions
>> without actually committing to any of the work involved in creating a
> proper
>> setup for persistent profiles. That feels like a distraction to me, at the
>> moment, and we could spend the time on more interesting things.
>>
>> On 2015-12-17 11:07 AM, Josh Matthews wrote:
>>>
>>> ---------- Forwarded message ----------
>>> From: "Simon Sapin" <simon.sa...@exyr.org>
>>> Date: Dec 17, 2015 11:06 AM
>>> Subject: Profile directory (Re: [dev-servo] IndexDB project)
>>> To: "Josh Matthews" <j...@joshmatthews.net>
>>> Cc:
>>>
>>> On 17/12/15 14:43, Josh Matthews wrote:
>>>
>>>> We still don't have any persistent storage in Servo, such as a profile
>>>> folder. I would be fine with adding a command line option to provide a
>>>> profile directory, or creating a temporary directory if none is
> provided.
>>>>
>>>
>>> At least on Linux, there are conventions of where things like a profile
>>> directory should go:
>>>
>>> http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
>>>
>>> Different types of things (config, cache, user data, …), each with a
>>> default location like $HOME/.config and an environment variable to
>>> override
>>> them (so a command-line argument may not be necessary)
>>>
>>> And there’s a Rust implementation that does the environment variable
>>> lookup, fallbacks, creates directories as needed, etc:
>>>
>>> https://crates.io/crates/xdg/
>>> https://whitequark.github.io/rust-xdg/xdg/struct.BaseDirectories.html
>>>
>>>
>>> I don’t know about other platforms’ conventions, but this can be a start.
>>>
>>
>> _______________________________________________
>> dev-servo mailing list
>> dev-servo@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-servo
> _______________________________________________
> dev-servo mailing list
> dev-servo@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-servo
> 


-- 
Fabrice Desré
b2g team
Mozilla Corporation
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to