From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: [Orgmode] Slow speed of week and month views Date: Sat, 05 Aug 2017 21:36:43 -0500 Message-ID: <87ini1pglg.fsf@alphapapa.net> References: <87efsre565.fsf@grothesque.org> <878tiyr9tg.fsf@alphapapa.net> <2017-08-05T23-06-00@devnull.Karl-Voit.at> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1deBhp-00008M-Hv for emacs-orgmode@gnu.org; Sat, 05 Aug 2017 22:54:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1deBhl-0000hq-8G for emacs-orgmode@gnu.org; Sat, 05 Aug 2017 22:54:17 -0400 Received: from [195.159.176.226] (port=41943 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1deBhl-0000hU-1E for emacs-orgmode@gnu.org; Sat, 05 Aug 2017 22:54:13 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1deBQt-0003Bo-Q9 for emacs-orgmode@gnu.org; Sun, 06 Aug 2017 04:36:47 +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 Thanks for your comments, John, that is very interesting. I'll have to check out your db code. I'll drop a penny in the bucket with this: http://github.com/alphapapa/org-agenda-ng I spent a few hours trying an alternative approach that uses org-element-parse-buffer to parse each file, then operates on the parse tree it produces. I was hoping it might have a chance to be an improvement, but unfortunately it's not: org-element-parse-buffer is very slow in comparison to the existing agenda code, and it eats up almost all the time spent building the (very primitive) agenda views. So, I think all we need is for someone to write a version of org-element-parse-buffer in C or CL or whatever their favorite language that compiles to a fast binary may be. Then we can read that into Emacs and operate on the resulting tree quickly. Yep, that's ALL we need... ;) Seriously, though, it would be amazing if the new library support in Emacs could be used to interface with a fast Org parser that provided the same output as org-element-parse-buffer. Maybe it could even be added to Emacs core, as the Org file format doesn't change much. All that's way over my head, I'm afraid. Would some kind of bounty work for a project like this? I'd be willing to contribute a few dollars and some testing. :) I also gave a cursory look at profiling org-element-parse-buffer, but I don't think Nicolas left any low-hanging fruit there. But I'm not experienced with profiling code like that, so don't take my word for it. :)