[darcs-devel] Profiling Darcs

Gwern Branwen gwern0 at gmail.com
Wed Apr 16 04:54:30 UTC 2008


On 2008.04.15 15:37:45 -0700, David Roundy <daveroundy at gmail.com> scribbled 0.9K characters:
> On Sat, Apr 12, 2008 at 10:31 AM, Gwern Branwen <gwern0 at gmail.com> wrote:
> >  # For Darcs-2 repos, the ByteString packed/unpack routines seem to
> >  take a really distressing amount of time. One of the two seems to
> >  always be in the top 4, and sometimes eating up extremely large
> >  amounts of time, like 38%. I have a theory that this is because the
> >  curl/libwww functions return a String, which immediately has to be
> >  packed into a ByteString for all the other functions; if this is true,
> >  then we might be able to get a real performance improvement with
> >  functions that do network I/O in ByteString.
>
> You probably should try profiling without bytestring.  If we're using
> String, I believe it's in the bytestring code, not in darcs proper.
> Certainly it's not true that libcurl uses String.

When I have some time I'll try and do that. But I thought the curl/libwww returned strings because when I looked in URL.hs, I see FFI imports like:

  libwww_request_url :: CString -> CString -> CInt -> IO CString

which C strings need to be converted with peekCString to String. Unless I'm misunderstanding something somewhere?

> I'll just add that profiling output is very hard to interpret.
>
> David

Can't disagree with that.

--
gwern
nitrite CipherTAC-2000 SEAL TEXTA Marx York Gazprom Chobetsu of 007
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-devel/attachments/20080416/eb80ab25/attachment.pgp 


More information about the darcs-devel mailing list