From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: [ANN] Agenda speed up Date: Mon, 28 Aug 2017 11:12:09 +0100 Message-ID: <87o9r0uhl2.fsf@t3610> References: <87h8wtugst.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmH1o-0007vC-0Z for emacs-orgmode@gnu.org; Mon, 28 Aug 2017 06:12:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmH1i-0002UQ-AZ for emacs-orgmode@gnu.org; Mon, 28 Aug 2017 06:12:19 -0400 Received: from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]:33510) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmH1i-0002Sl-41 for emacs-orgmode@gnu.org; Mon, 28 Aug 2017 06:12:14 -0400 Received: by mail-wr0-x232.google.com with SMTP id k94so312237wrc.0 for ; Mon, 28 Aug 2017 03:12:12 -0700 (PDT) In-Reply-To: <87h8wtugst.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sun, 27 Aug 2017 18:16:50 +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: Nicolas Goaziou Cc: Org Mode List --=-=-= Content-Type: text/plain On Sunday, 27 Aug 2017 at 18:16, Nicolas Goaziou wrote: > Hello, > > I rewrote the part responsible for agenda generation in "org-agenda.el". > Basically, I refactored some hot loops and introduced a cache mechanism > for data extracted out of agenda files. > > I expect to see some interesting improvements when viewing the agenda > with a span larger than one day, or when generating an agenda view > without having touched most of the agenda files since last view. > > Some feedback about the new agenda speed would be nice. Dear Nicolas, thank you for this. Speeding up the agenda is something that appeals given the complexity of my agenda and the often need to view weeks or months. I've compared timings old with new (from git a few minutes ago) by starting up emacs, instrumenting package org, viewing agenda (defaults to 1 day), switching to month view and then moving to the following month: Old agenda: | org-agenda-list | 3 | 19.770361111 | 6.5901203703 | | org-agenda-redo | 2 | 18.346457274 | 9.1732286370 | | org-let | 2 | 16.772160558 | 8.386080279 | | org-agenda-get-day-entries | 768 | 15.158740033 | 0.0197379427 | | org-agenda-get-scheduled | 768 | 9.5280991699 | 0.0124063791 | | org-agenda-later | 1 | 9.455895455 | 9.455895455 | | org-agenda-view-mode-dispatch | 1 | 9.181260158 | 9.181260158 | | org-agenda-month-view | 1 | 8.891024524 | 8.891024524 | | org-agenda-change-time-span | 1 | 8.891016702 | 8.891016702 | | org-agenda-prepare-buffers | 5 | 5.8218686260 | 1.1643737252 | | org-agenda-prepare | 3 | 4.4909116949 | 1.4969705649 | | org-at-planning-p | 38979 | 3.8525446340 | 9.883...e-05 | | org-agenda | 1 | 3.198932055 | 3.198932055 | New agenda: | org-agenda-list | 3 | 29.473988928 | 9.824662976 | | org-agenda-redo | 2 | 28.332199373 | 14.166099686 | | org-let | 2 | 25.852282215 | 12.926141107 | | org-agenda-day-entries | 768 | 25.210189072 | 0.0328257670 | | org-agenda-view-mode-dispatch | 1 | 14.441177311 | 14.441177311 | | org-agenda-month-view | 1 | 14.281358385 | 14.281358385 | | org-agenda-change-time-span | 1 | 14.281353565 | 14.281353565 | | org-agenda-later | 1 | 14.051216182 | 14.051216182 | | org-back-to-heading | 110331 | 9.5532106970 | 8.658...e-05 | | org-get-todo-state | 96677 | 9.5383469060 | 9.866...e-05 | | org-agenda-skip | 97251 | 8.0815792529 | 8.310...e-05 | | org-agenda-prepare-buffers | 5 | 5.7887248999 | 1.15774498 | | org-agenda-prepare | 3 | 4.180059331 | 1.3933531103 | | org-agenda | 1 | 3.805856309 | 3.805856309 | | org-agenda-to-appt | 2 | 2.477811826 | 1.238905913 | | org-get-agenda-file-buffer | 888 | 1.8626567679 | 0.0020975864 | I had to remove a bunch of <%% (...)> items in one of my agenda files as these gave me error messages about the sexp. Finally, most importantly, the actual items shown in the day view with the new code are only a subset of those shown with the old view. I cannot see any pattern in those omitted. Thanks again, eric -- : Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-796-gbae41a --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWaPseQAKCRDIkZPY//z2 fc5nAJ9HFjJW4oDt8d7KYmV66f/7HoODoACeMeNTtcu28dX4lQPuMilelTLh31A= =WnH7 -----END PGP SIGNATURE----- --=-=-=--