* Interpreting statprof
@ 2013-09-17 16:14 Dmitry Bogatov
2013-09-17 18:05 ` Andy Wingo
2013-09-17 18:05 ` Andy Wingo
0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Bogatov @ 2013-09-17 16:14 UTC (permalink / raw)
To: guile-user@gnu.org
[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]
Hello!
Today I tried to statprof my toy application, that uses htmlprag
since it is too slow (4 sec on one page) vs 0.5 with Python.
Statprof says, that most of time takes `eval` function, but I checked
htmlprag source --- it does not use eval. So question is where is it
called and what can I do to speedup my application?
PS. Should I attach source file and html file to parse?
% cumulative self
time seconds seconds name
56.48 4.22 2.38 eval
11.82 0.50 0.50 memoized-expression-data
9.22 0.39 0.39 list-ref
8.36 0.35 0.35 memoized-expression-typecode
4.03 0.17 0.17 write-char
2.31 0.10 0.10 get-output-string
1.44 0.06 0.06 list-set!
1.15 0.05 0.05 variable?
1.15 0.05 0.05 open-output-string
0.86 0.04 0.04 read-char
0.86 0.04 0.04 #<procedure 27e8960 at ice-9/eval.scm:416:20 ()>
0.58 0.02 0.02 eqv?
0.29 0.01 0.01 equal?
0.29 0.01 0.01 memv
0.29 0.01 0.01 map
0.29 0.01 0.01 string->symbol
0.29 0.01 0.01 eof-object?
0.29 0.01 0.01 #<procedure 253c900 at ice-9/eval.scm:416:20 (a)>
0.00 4.22 0.00 statprof
0.00 4.22 0.00 save-module-excursion
0.00 4.22 0.00 #<procedure 25051c0 at ice-9/boot-9.scm:3961:3 ()>
0.00 4.22 0.00 #<procedure 27e2690 at statprof.scm:655:4 ()>
0.00 4.22 0.00 load-compiled/vm
0.00 4.22 0.00 apply-smob/1
0.00 4.22 0.00 call-with-prompt
0.00 4.22 0.00 catch
0.00 4.22 0.00 perform-action
---
Sample count: 347
Total time: 4.218837499 seconds (0.176613742 seconds in GC)
--
Best regards, Dmitry Bogatov <KAction@gnu.org>,
Free Software supporter and netiquette guardian.
git clone git://kaction.name/rc-files.git --depth 1
GPG: 54B7F00D
Html mail and proprietary format attachments are forwarded to /dev/null.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Interpreting statprof
2013-09-17 16:14 Interpreting statprof Dmitry Bogatov
@ 2013-09-17 18:05 ` Andy Wingo
2013-09-17 18:05 ` Andy Wingo
1 sibling, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2013-09-17 18:05 UTC (permalink / raw)
To: Dmitry Bogatov; +Cc: guile-user@gnu.org
On Tue 17 Sep 2013 18:14, Dmitry Bogatov <KAction@gnu.org> writes:
> Hello!
>
> Today I tried to statprof my toy application, that uses htmlprag
> since it is too slow (4 sec on one page) vs 0.5 with Python.
> Statprof says, that most of time takes `eval` function, but I checked
> htmlprag source --- it does not use eval. So question is where is it
> called and what can I do to speedup my application?
>
> PS. Should I attach source file and html file to parse?
>
> % cumulative self
> time seconds seconds name
> 56.48 4.22 2.38 eval
> 11.82 0.50 0.50 memoized-expression-data
> 9.22 0.39 0.39 list-ref
> 8.36 0.35 0.35 memoized-expression-typecode
Probably this means that your program is being interpreted, rather than
compiled. Or something is being interpreted, anyway. Check that you
have auto-compilation on.
Cheers,
Andy
> 4.03 0.17 0.17 write-char
> 2.31 0.10 0.10 get-output-string
> 1.44 0.06 0.06 list-set!
> 1.15 0.05 0.05 variable?
> 1.15 0.05 0.05 open-output-string
> 0.86 0.04 0.04 read-char
> 0.86 0.04 0.04 #<procedure 27e8960 at ice-9/eval.scm:416:20 ()>
> 0.58 0.02 0.02 eqv?
> 0.29 0.01 0.01 equal?
> 0.29 0.01 0.01 memv
> 0.29 0.01 0.01 map
> 0.29 0.01 0.01 string->symbol
> 0.29 0.01 0.01 eof-object?
> 0.29 0.01 0.01 #<procedure 253c900 at ice-9/eval.scm:416:20 (a)>
> 0.00 4.22 0.00 statprof
> 0.00 4.22 0.00 save-module-excursion
> 0.00 4.22 0.00 #<procedure 25051c0 at ice-9/boot-9.scm:3961:3 ()>
> 0.00 4.22 0.00 #<procedure 27e2690 at statprof.scm:655:4 ()>
> 0.00 4.22 0.00 load-compiled/vm
> 0.00 4.22 0.00 apply-smob/1
> 0.00 4.22 0.00 call-with-prompt
> 0.00 4.22 0.00 catch
> 0.00 4.22 0.00 perform-action
> ---
> Sample count: 347
> Total time: 4.218837499 seconds (0.176613742 seconds in GC)
>
> --
> Best regards, Dmitry Bogatov <KAction@gnu.org>,
> Free Software supporter and netiquette guardian.
> git clone git://kaction.name/rc-files.git --depth 1
> GPG: 54B7F00D
> Html mail and proprietary format attachments are forwarded to /dev/null.
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Interpreting statprof
2013-09-17 16:14 Interpreting statprof Dmitry Bogatov
2013-09-17 18:05 ` Andy Wingo
@ 2013-09-17 18:05 ` Andy Wingo
2013-09-17 18:39 ` Dmitry Bogatov
1 sibling, 1 reply; 4+ messages in thread
From: Andy Wingo @ 2013-09-17 18:05 UTC (permalink / raw)
To: Dmitry Bogatov; +Cc: guile-user@gnu.org
On Tue 17 Sep 2013 18:14, Dmitry Bogatov <KAction@gnu.org> writes:
> Hello!
>
> Today I tried to statprof my toy application, that uses htmlprag
> since it is too slow (4 sec on one page) vs 0.5 with Python.
> Statprof says, that most of time takes `eval` function, but I checked
> htmlprag source --- it does not use eval. So question is where is it
> called and what can I do to speedup my application?
>
> PS. Should I attach source file and html file to parse?
>
> % cumulative self
> time seconds seconds name
> 56.48 4.22 2.38 eval
> 11.82 0.50 0.50 memoized-expression-data
> 9.22 0.39 0.39 list-ref
> 8.36 0.35 0.35 memoized-expression-typecode
Probably this means that your program is being interpreted, rather than
compiled. Or something is being interpreted, anyway. Check that you
have auto-compilation on.
Cheers,
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Interpreting statprof
2013-09-17 18:05 ` Andy Wingo
@ 2013-09-17 18:39 ` Dmitry Bogatov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Bogatov @ 2013-09-17 18:39 UTC (permalink / raw)
To: Andy Wingo; +Cc: guile-user@gnu.org
[-- Attachment #1: Type: text/plain, Size: 961 bytes --]
Andy Wingo <wingo@pobox.com> writes:
>> Today I tried to statprof my toy application, that uses htmlprag
>> since it is too slow (4 sec on one page) vs 0.5 with Python.
>> Statprof says, that most of time takes `eval` function, but I checked
>> htmlprag source --- it does not use eval. So question is where is it
>> called and what can I do to speedup my application?
>> time seconds seconds name
>> 56.48 4.22 2.38 eval
>> 11.82 0.50 0.50 memoized-expression-data
> Probably this means that your program is being interpreted, rather than
> compiled. Or something is being interpreted, anyway. Check that you
> have auto-compilation on.
Thanks! It reduced time from 4 sec to 0.4.
--
Best regards, Dmitry Bogatov <KAction@gnu.org>,
Free Software supporter and netiquette guardian.
git clone git://kaction.name/rc-files.git --depth 1
GPG: 54B7F00D
Html mail and proprietary format attachments are forwarded to /dev/null.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-17 18:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 16:14 Interpreting statprof Dmitry Bogatov
2013-09-17 18:05 ` Andy Wingo
2013-09-17 18:05 ` Andy Wingo
2013-09-17 18:39 ` Dmitry Bogatov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).