From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: Slow speed of week and month views Date: Sun, 6 Aug 2017 12:03:56 +0200 Message-ID: <2017-08-06T11-59-59@devnull.Karl-Voit.at> References: <87efsre565.fsf@grothesque.org> <878tiyr9tg.fsf@alphapapa.net> <2017-08-05T23-06-00@devnull.Karl-Voit.at> <87h8xlhccj.fsf@nicolasgoaziou.fr> <2017-08-06T09-54-26@devnull.Karl-Voit.at> <87tw1ldsdc.fsf@nicolasgoaziou.fr> <2017-08-06T10-41-07@devnull.Karl-Voit.at> <87a83doy7f.fsf@alphapapa.net> Reply-To: Karl Voit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1deIPv-0007AI-4k for emacs-orgmode@gnu.org; Sun, 06 Aug 2017 06:04:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1deIPs-0006AM-0m for emacs-orgmode@gnu.org; Sun, 06 Aug 2017 06:04:15 -0400 Received: from [195.159.176.226] (port=35683 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1deIPr-0006A6-Py for emacs-orgmode@gnu.org; Sun, 06 Aug 2017 06:04:11 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1deIPg-0000nn-Op for emacs-orgmode@gnu.org; Sun, 06 Aug 2017 12:04:00 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi Adam, * Adam Porter wrote: > Karl Voit writes: > >> With a fairly modified configuration (like mine on [0]) and a large >> set of long Org-mode files I can't publish, it is hard to do >> analysis here. So I can offer to report any performance annoyances >> and anything you need to execute (report) on my side. > > It might be helpful if you posted a censored version of your large Org > files somewhere. There's a function by Nicolas that replaces all the > characters with "x", and there's also a function that replaces words > with random words of the same length (that one takes a while to run). Nicolas, can you provide an URL for this? Sounds interesting. >> I just learned about elp-instrument-package. What prefixes are of interest to >> you? > > FYI, here's a handy "elp-profile" macro that automatically > de-instruments after running. It shows the top 20 functions by default, > but you can adjust that easily. > > https://alphapapa.github.io/emacs-package-dev-handbook/#orgc830139 I executed following code below (without changing the prefixes yet for testing purposes) which resulted in my usual Agenda but no additional buffer showing any results. M-x elp-results is also empty. What did I do the wrong way? (defmacro elp-profile (times &rest body) "Call this macro from an Org source block and you'll get a results block showing which 20 functions were called the most times, how long they took to run, etc. Set prefixes to a list of strings matching the prefixes of the functions you want to instrument. Use it like this: (elp-profile 10 (goto-char (point-min)) (search-forward \"something\")) " (declare (indent defun)) `(let ((prefixes '("string-" "s-" "buffer-" "append" "delq" "map" "list" "car" "save-" "outline-" "delete-dups" "sort" "line-" "nth" "concat" "char-to-string" "rx-" "goto-" "when" "search-" "re-")) output) (dolist (prefix prefixes) (elp-instrument-package prefix)) (dotimes (x ,times) ,@body) (elp-results) (elp-restore-all) (point-min) (forward-line 20) (delete-region (point) (point-max)) (setq output (buffer-substring-no-properties (point-min) (point-max))) (kill-buffer) (delete-window) output)) (elp-profile 1 (goto-char (point-min)) (org-agenda-list)) -- get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode: > get Memacs from https://github.com/novoid/Memacs < Personal Information Management > http://Karl-Voit.at/tags/pim/ Emacs-related > http://Karl-Voit.at/tags/emacs/