all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* opening a 0.5 MB org file is slow
@ 2020-09-29 19:11 Uwe Brauer
  2020-09-29 21:06 ` Jeremie Juste
  0 siblings, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2020-09-29 19:11 UTC (permalink / raw)
  To: emacs-orgmode



Hi 

maybe I am just to impatient but on my 8 GB Thinkpad X1 (4gen) to open a
0.5MB org file takes around 15 sec.

Any change to speed this up?

Thanks and regards

Uwe Brauer 



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-29 19:11 opening a 0.5 MB org file is slow Uwe Brauer
@ 2020-09-29 21:06 ` Jeremie Juste
  2020-09-29 21:48   ` Russell Adams
                     ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Jeremie Juste @ 2020-09-29 21:06 UTC (permalink / raw)
  To: emacs-orgmode

Hello Uwe,

Can you test with emacs -Q ?

A 1.6M org file took a little under 7 sec on my computer.
It probably depends on the number of minor modes are being loaded, font-lock,
auto-completion, etc. 

I'm afraid I don't know how to profile the opening of a file. Does
anybody know a function that would do the profiling like
elp-instrument-function for functions?

-- 
HTH
Jeremie Juste



On Tuesday, 29 Sep 2020 at 21:11, Uwe Brauer wrote:
> Hi 
>
> maybe I am just to impatient but on my 8 GB Thinkpad X1 (4gen) to open a
> 0.5MB org file takes around 15 sec.
>
> Any change to speed this up?
>
> Thanks and regards
>
> Uwe Brauer 
>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-29 21:06 ` Jeremie Juste
@ 2020-09-29 21:48   ` Russell Adams
  2020-09-30  4:12   ` Ihor Radchenko
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Russell Adams @ 2020-09-29 21:48 UTC (permalink / raw)
  To: emacs-orgmode

On Tue, Sep 29, 2020 at 11:06:39PM +0200, Jeremie Juste wrote:
> Can you test with emacs -Q ?

Another good question is are you starting Emacs and opening the file,
or just opening the file with Emacs already loaded?


------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com

PGP Key ID:     0x1160DCB3           http://www.adamsinfoserv.com/

Fingerprint:    1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-29 21:06 ` Jeremie Juste
  2020-09-29 21:48   ` Russell Adams
@ 2020-09-30  4:12   ` Ihor Radchenko
  2020-09-30  4:35     ` Samuel Wales
  2020-09-30 16:37   ` Eric S Fraga
  2020-09-30 19:10   ` Uwe Brauer
  3 siblings, 1 reply; 14+ messages in thread
From: Ihor Radchenko @ 2020-09-30  4:12 UTC (permalink / raw)
  To: Jeremie Juste, emacs-orgmode

> I'm afraid I don't know how to profile the opening of a file. Does
> anybody know a function that would do the profiling like
> elp-instrument-function for functions?

There is elp-instrument-package. Also, I did successful profiling with
simple profiler-start/profiler-report before and after opening the file.

In general, time for opening org files depends on many factors [1].
Profiling is the way to go if one wants to find the bottlenecks.


[1] https://www.reddit.com/r/orgmode/comments/ivifjv/a_question_about_orgagenda_performance_and_org/g5rxzf6/

Best,
Ihor



Jeremie Juste <jeremiejuste@gmail.com> writes:

> Hello Uwe,
>
> Can you test with emacs -Q ?
>
> A 1.6M org file took a little under 7 sec on my computer.
> It probably depends on the number of minor modes are being loaded, font-lock,
> auto-completion, etc. 
>
> I'm afraid I don't know how to profile the opening of a file. Does
> anybody know a function that would do the profiling like
> elp-instrument-function for functions?
>
> -- 
> HTH
> Jeremie Juste
>
>
>
> On Tuesday, 29 Sep 2020 at 21:11, Uwe Brauer wrote:
>> Hi 
>>
>> maybe I am just to impatient but on my 8 GB Thinkpad X1 (4gen) to open a
>> 0.5MB org file takes around 15 sec.
>>
>> Any change to speed this up?
>>
>> Thanks and regards
>>
>> Uwe Brauer 
>>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-30  4:12   ` Ihor Radchenko
@ 2020-09-30  4:35     ` Samuel Wales
  2020-09-30  5:01       ` TEC
  0 siblings, 1 reply; 14+ messages in thread
From: Samuel Wales @ 2020-09-30  4:35 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

a long time ago i discovered that drawers were the bottleneck.  i
removed a lot of them and got much faster loading speeds.  idk if that
is still true.

i think there is an effort to speed logbook and properties up by
changing from overlays to text properties or so.

recent maint is perhaps twice as fast at loading for me as the
previous release was.


On 9/29/20, Ihor Radchenko <yantar92@gmail.com> wrote:
>> I'm afraid I don't know how to profile the opening of a file. Does
>> anybody know a function that would do the profiling like
>> elp-instrument-function for functions?
>
> There is elp-instrument-package. Also, I did successful profiling with
> simple profiler-start/profiler-report before and after opening the file.
>
> In general, time for opening org files depends on many factors [1].
> Profiling is the way to go if one wants to find the bottlenecks.
>
>
> [1]
> https://www.reddit.com/r/orgmode/comments/ivifjv/a_question_about_orgagenda_performance_and_org/g5rxzf6/
>
> Best,
> Ihor
>
>
>
> Jeremie Juste <jeremiejuste@gmail.com> writes:
>
>> Hello Uwe,
>>
>> Can you test with emacs -Q ?
>>
>> A 1.6M org file took a little under 7 sec on my computer.
>> It probably depends on the number of minor modes are being loaded,
>> font-lock,
>> auto-completion, etc.
>>
>> I'm afraid I don't know how to profile the opening of a file. Does
>> anybody know a function that would do the profiling like
>> elp-instrument-function for functions?
>>
>> --
>> HTH
>> Jeremie Juste
>>
>>
>>
>> On Tuesday, 29 Sep 2020 at 21:11, Uwe Brauer wrote:
>>> Hi
>>>
>>> maybe I am just to impatient but on my 8 GB Thinkpad X1 (4gen) to open a
>>> 0.5MB org file takes around 15 sec.
>>>
>>> Any change to speed this up?
>>>
>>> Thanks and regards
>>>
>>> Uwe Brauer
>>>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-30  4:35     ` Samuel Wales
@ 2020-09-30  5:01       ` TEC
  2020-09-30  5:13         ` Ihor Radchenko
  2020-09-30 19:13         ` Uwe Brauer
  0 siblings, 2 replies; 14+ messages in thread
From: TEC @ 2020-09-30  5:01 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode, Ihor Radchenko


Samuel Wales <samologist@gmail.com> writes:

> a long time ago i discovered that drawers were the bottleneck. 
> i
> removed a lot of them and got much faster loading speeds.  idk 
> if that
> is still true.

There's a thread about improving this, see:
https://orgmode.org/list/87h7x9e5jo.fsf@localhost/

Just in case that's of interest :)

Timothy.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-30  5:01       ` TEC
@ 2020-09-30  5:13         ` Ihor Radchenko
  2020-09-30 22:33           ` Jeremie Juste
  2020-09-30 19:13         ` Uwe Brauer
  1 sibling, 1 reply; 14+ messages in thread
From: Ihor Radchenko @ 2020-09-30  5:13 UTC (permalink / raw)
  To: TEC, Samuel Wales; +Cc: emacs-orgmode

> There's a thread about improving this, see:
> https://orgmode.org/list/87h7x9e5jo.fsf@localhost/
>
> Just in case that's of interest :)

If anyone is interested, any feedback and/or testing will be
appreciated. The relevant patch is complete in terms of functionality
now.

Best,
Ihor

TEC <tecosaur@gmail.com> writes:

> Samuel Wales <samologist@gmail.com> writes:
>
>> a long time ago i discovered that drawers were the bottleneck. 
>> i
>> removed a lot of them and got much faster loading speeds.  idk 
>> if that
>> is still true.
>
> There's a thread about improving this, see:
> https://orgmode.org/list/87h7x9e5jo.fsf@localhost/
>
> Just in case that's of interest :)
>
> Timothy.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-29 21:06 ` Jeremie Juste
  2020-09-29 21:48   ` Russell Adams
  2020-09-30  4:12   ` Ihor Radchenko
@ 2020-09-30 16:37   ` Eric S Fraga
  2020-09-30 19:10   ` Uwe Brauer
  3 siblings, 0 replies; 14+ messages in thread
From: Eric S Fraga @ 2020-09-30 16:37 UTC (permalink / raw)
  To: Jeremie Juste; +Cc: emacs-orgmode

On Tuesday, 29 Sep 2020 at 23:06, Jeremie Juste wrote:
> A 1.6M org file took a little under 7 sec on my computer.

A 2.1MB file took about 11 seconds on my computer (not new but high spec 8 years ago: multiple Xeon processors with a lot of memory but probably slow disk).

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-38-g16f505


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-29 21:06 ` Jeremie Juste
                     ` (2 preceding siblings ...)
  2020-09-30 16:37   ` Eric S Fraga
@ 2020-09-30 19:10   ` Uwe Brauer
  2020-09-30 22:27     ` Jeremie Juste
  3 siblings, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2020-09-30 19:10 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 223 bytes --]

>>> "JJ" == Jeremie Juste <jeremiejuste@gmail.com> writes:

Hi Jeremie


> Hello Uwe,
> Can you test with emacs -Q ?


I did and then it is much much faster, so the question is which of my
dozens of org files slow it down.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-30  5:01       ` TEC
  2020-09-30  5:13         ` Ihor Radchenko
@ 2020-09-30 19:13         ` Uwe Brauer
  1 sibling, 0 replies; 14+ messages in thread
From: Uwe Brauer @ 2020-09-30 19:13 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

>>> "T" == TEC  <tecosaur@gmail.com> writes:

> Samuel Wales <samologist@gmail.com> writes:

>> a long time ago i discovered that drawers were the bottleneck. i
>> removed a lot of them and got much faster loading speeds.  idk if
>> that
>> is still true.

> There's a thread about improving this, see:
> https://orgmode.org/list/87h7x9e5jo.fsf@localhost/

Thanks I tried it out. Did not really help :-(

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-30 19:10   ` Uwe Brauer
@ 2020-09-30 22:27     ` Jeremie Juste
  2020-10-01  8:41       ` Uwe Brauer
  0 siblings, 1 reply; 14+ messages in thread
From: Jeremie Juste @ 2020-09-30 22:27 UTC (permalink / raw)
  To: emacs-orgmode

Hello Uwe,

Very well, it seems that we are on the right track. So you might gain
some speed by preventing some minor modes to load at the beginning and
load only when you need them.

Like Ihor Radchenko mentioned in his previous a great way to diagnose
the issu would be the following:

1. M-x profiler-start cpu
2. open your file
3. M-x profiler-report 

It will let you see which functions are slowing you down.

HTH,
-- 
Jeremie Juste


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-30  5:13         ` Ihor Radchenko
@ 2020-09-30 22:33           ` Jeremie Juste
  0 siblings, 0 replies; 14+ messages in thread
From: Jeremie Juste @ 2020-09-30 22:33 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-09-30 22:27     ` Jeremie Juste
@ 2020-10-01  8:41       ` Uwe Brauer
  2020-10-01  8:44         ` Ihor Radchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Uwe Brauer @ 2020-10-01  8:41 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

>>> "JJ" == Jeremie Juste <jeremiejuste@gmail.com> writes:

> Hello Uwe,
> Very well, it seems that we are on the right track. So you might gain
> some speed by preventing some minor modes to load at the beginning and
> load only when you need them.

> Like Ihor Radchenko mentioned in his previous a great way to diagnose
> the issu would be the following:

> 1. M-x profiler-start cpu
> 2. open your file
> 3. M-x profiler-report 

> It will let you see which functions are slowing you down.

Thanks! I did it. But I am a bit puzzled about the outcome:

+ redisplay_internal (C function)                                1724  82%
+ command-execute                                                 215  10%
+ ...                                                             117   5%
+ timer-event-handler                                              22   1%
  global-orglink-mode-check-buffers                                 1   0%

Not sure what to do with stuff on the C level.

Uwe 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: opening a 0.5 MB org file is slow
  2020-10-01  8:41       ` Uwe Brauer
@ 2020-10-01  8:44         ` Ihor Radchenko
  0 siblings, 0 replies; 14+ messages in thread
From: Ihor Radchenko @ 2020-10-01  8:44 UTC (permalink / raw)
  To: Uwe Brauer, emacs-orgmode

> + redisplay_internal (C function)                                1724  82%
> Not sure what to do with stuff on the C level.

Look inside that branch. Most likely redisplay is calling font-lock
staff. You need to check what particular part of fontification is slow.

Best,
Ihor

Uwe Brauer <oub@mat.ucm.es> writes:

>>>> "JJ" == Jeremie Juste <jeremiejuste@gmail.com> writes:
>
>> Hello Uwe,
>> Very well, it seems that we are on the right track. So you might gain
>> some speed by preventing some minor modes to load at the beginning and
>> load only when you need them.
>
>> Like Ihor Radchenko mentioned in his previous a great way to diagnose
>> the issu would be the following:
>
>> 1. M-x profiler-start cpu
>> 2. open your file
>> 3. M-x profiler-report 
>
>> It will let you see which functions are slowing you down.
>
> Thanks! I did it. But I am a bit puzzled about the outcome:
>
> + redisplay_internal (C function)                                1724  82%
> + command-execute                                                 215  10%
> + ...                                                             117   5%
> + timer-event-handler                                              22   1%
>   global-orglink-mode-check-buffers                                 1   0%
>
> Not sure what to do with stuff on the C level.
>
> Uwe 


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-10-01  8:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-29 19:11 opening a 0.5 MB org file is slow Uwe Brauer
2020-09-29 21:06 ` Jeremie Juste
2020-09-29 21:48   ` Russell Adams
2020-09-30  4:12   ` Ihor Radchenko
2020-09-30  4:35     ` Samuel Wales
2020-09-30  5:01       ` TEC
2020-09-30  5:13         ` Ihor Radchenko
2020-09-30 22:33           ` Jeremie Juste
2020-09-30 19:13         ` Uwe Brauer
2020-09-30 16:37   ` Eric S Fraga
2020-09-30 19:10   ` Uwe Brauer
2020-09-30 22:27     ` Jeremie Juste
2020-10-01  8:41       ` Uwe Brauer
2020-10-01  8:44         ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.