[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Add platform information to user agent string

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Fri, 2 Nov 2012 14:45:45 +0400

On Wed, Oct 31, 2012 at 1:46 AM, Stefan Sperling <stsp_at_elego.de> wrote:
> On Wed, Oct 31, 2012 at 12:25:43AM +0400, Ivan Zhakov wrote:
>> I completely agree that it would be great to have one code to get
>> platform information. But current svn_sysinfo* implementation provides
>> detailed information which very expensive to obtain. In some codepath
>> we have to execute external commands. This is fine for separate
>> command, but I think that's does makes sense for every Subversion
>> library call. That's why I suggest use static build time information
>> in user-agent string.
>
> Running uname is too expensive?
> Can you show some benchmark numbers to back this up? :)
>
> If it is prohibitively expensive perhaps you could use a global
> variable to store the OS name and set it up at startup with
> svn_atomic__init_once()?
On some configurations uname is not enough. See lsb_release() code in
subversion/libsvn_subr/sysinfo.c for example().

-- 
Ivan Zhakov
Received on 2012-11-02 11:46:40 CET

This is an archived mail posted to the Subversion Dev mailing list.