[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Discussion request: 15m tangle time, details follow
From: |
Thorsten Jolitz |
Subject: |
Re: [O] Discussion request: 15m tangle time, details follow |
Date: |
Wed, 18 Jun 2014 11:34:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Thorsten Jolitz <address@hidden> writes:
> Grant Rettke <address@hidden> writes:
>
>> The average build takes 15m.
> [with-current-buffer "TC3F.org]
> After this is done *once*, you can always switch between emacs-lisp and
> org-mode with outorg, It takes 0.4 sec to convert the whole file to org
> again
>
> ,------------------------------------------
> | (benchmark-run (outorg-edit-as-org '(4)))
> | (0.365756325 1 0.13800897400000167)
> `------------------------------------------
>
> and 1.6 sec to convert it back to outshine (I have to fix this speed
> difference ;)
>
> ,---------------------------------------------
> | (benchmark-run (outorg-copy-edits-and-exit))
> | (1.616835235 8 1.106696710999998)
> `---------------------------------------------
This thread inspired me to profile these two commands - they do roughly
the same thing, only in the opposite direction, and I found it strange
why converting from Source to Org should be 4x faster than converting
from Org to Source.
It turned out that
,------------------------------------------------------------
| kill-whole-line is an interactive compiled Lisp function in
| `simple.el'.
`------------------------------------------------------------
was the sole culprit (used for killing the source-block
ddelimiters). Its a lisp function and does too many things besides
killing the line. Replacing it with C function
,------------------------------------------------------------------
| delete-region is an interactive built-in function in `editfns.c'.
`------------------------------------------------------------------
improves performance to (on whole file TC3):
,---------------------------------------------
| (benchmark-run (outorg-copy-edits-and-exit))
| (0.66580701 2 0.28894333600000266)
`---------------------------------------------
The remaining speed difference is partly because I undo the indendation
introduced in the Org source-blocks before the conversion back to
source, and thus need to process the file twice.
--
cheers,
Thorsten
- Re: [O] Discussion request: 15m tangle time, details follow, (continued)
- Re: [O] Discussion request: 15m tangle time, details follow, Eric Schulte, 2014/06/18
- Re: [O] Discussion request: 15m tangle time, details follow, Grant Rettke, 2014/06/18
- Re: [O] Discussion request: 15m tangle time, details follow, Eric Schulte, 2014/06/19
- Re: [O] Discussion request: 15m tangle time, details follow, Grant Rettke, 2014/06/19
- Re: [O] Discussion request: 15m tangle time, details follow, Grant Rettke, 2014/06/19
- Re: [O] Discussion request: 15m tangle time, details follow, Grant Rettke, 2014/06/20
Re: [O] Discussion request: 15m tangle time, details follow, Grant Rettke, 2014/06/18
Re: [O] Discussion request: 15m tangle time, details follow, Nick Dokos, 2014/06/17
Re: [O] Discussion request: 15m tangle time, details follow, Thorsten Jolitz, 2014/06/18
Re: [O] Discussion request: 15m tangle time, details follow, Andreas Leha, 2014/06/18