[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb 2fa4379 14/21: New option ebdb-try-speedups
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb 2fa4379 14/21: New option ebdb-try-speedups |
Date: |
Sun, 17 Sep 2017 15:32:47 -0400 (EDT) |
branch: externals/ebdb
commit 2fa437987a34a902959fadc3be02710399643955
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
New option ebdb-try-speedups
Addresses #53
* ebdb.el (ebdb-try-speedups): Do "risky things" in an effort to make
EBDB go faster. Right now all that means is setting
eieio-skip-typecheck to t while loading, but other tricks could be
governed by this option in the future.
* ebdb.org: Document.
* ebdb.texi: etc
* ebdb.info: etc
---
ebdb.el | 18 ++++++++++-
ebdb.info | 106 ++++++++++++++++++++++++++++++++++----------------------------
ebdb.org | 10 ++++++
ebdb.texi | 10 ++++++
4 files changed, 95 insertions(+), 49 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index d31ec17..fad9363 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -176,6 +176,14 @@ Organization names are currently hard-coded to use
:group 'ebdb-eieio
:type 'class)
+(defcustom ebdb-try-speedups nil
+ "When non-nil, try to speed up loading by disabling checks.
+This will set `eieio-skip-typecheck' when loading databases. The
+type checks are done for a reason, it's possible this might lead
+to errors or database corruption."
+ :group 'ebdb-eieio
+ :type 'boolean)
+
(defgroup ebdb nil
"The Insidious Big Brother Database."
:group 'news
@@ -4880,13 +4888,21 @@ Do this only if `ebdb-check-postcode' is non-nil."
;;; Reading and Writing the EBDB
+;; Loading and initialization is slow. Mostly loading. In my own
+;; case, setting `eieio-skip-typecheck' to t dropped overall load
+;; times from 2.5 seconds to 2 seconds. Otherwise, if we want to find
+;; further speedups, we could try overriding `object-write' for ebdb
+;; classes and see if it's possible to write an object that can be
+;; read faster.
+
;;;###autoload
(defun ebdb-load ()
"Load all databases listed in `ebdb-sources'. All the
important work is done by the `ebdb-db-load' method."
(let ((sources (if (listp ebdb-sources)
ebdb-sources
- (list ebdb-sources))))
+ (list ebdb-sources)))
+ (eieio-skip-typecheck ebdb-try-speedups))
;; Check if we're re-loading.
(when (and ebdb-db-list
(object-assoc t 'dirty ebdb-db-list))
diff --git a/ebdb.info b/ebdb.info
index b8ca680..3e601aa 100644
--- a/ebdb.info
+++ b/ebdb.info
@@ -277,6 +277,13 @@ buffers, which runs ‘ebdb-save’. By default, EBDB also
installs
‘ebdb-save’ as part of the ‘kill-emacs-hook’. Set
‘ebdb-install-save-hook’ to nil to prevent this.
+ Loading and initializing the EBDB can be slow for large databases.
+If you find yourself annoyed by the wait, try setting
+‘ebdb-try-speedups’ to non-nil. This will disable some checks performed
+during the object creation process, which theoretically shouldn’t make a
+difference. If something does go wrong at load-time, however, try
+setting this back to ‘nil’ first.
+
File: ebdb.info, Node: Creating Records, Next: Record Fields, Prev: The
EBDB Database, Up: Top
@@ -1915,6 +1922,7 @@ Index
* d e: The EBDB Database. (line 46)
* d m: The EBDB Database. (line 57)
* d r: The EBDB Database. (line 67)
+* Database load times: The EBDB Database. (line 83)
* Databases: The EBDB Database. (line 11)
* Deleting fields: Deleting Records and Fields.
(line 6)
@@ -2093,6 +2101,7 @@ Index
* ebdb-sources: The EBDB Database. (line 11)
* ebdb-toggle-records-format: The Basics of ebdb-mode.
(line 61)
+* ebdb-try-speedups: The EBDB Database. (line 83)
* ebdb-use-diary: Diary Integration. (line 13)
* ebdb-user-name-address-re: Auto-Updating Records.
(line 48)
@@ -2120,6 +2129,7 @@ Index
* Internationalization: Internationalization.
(line 6)
* Inverting searches: Searching. (line 46)
+* Loading databases: The EBDB Database. (line 83)
* m: The Basics of ebdb-mode.
(line 56)
* Mail aliases: Mail Aliases. (line 6)
@@ -2178,54 +2188,54 @@ Node: Migration from BBDB3026
Node: Record Migration3201
Node: Variables and Options3921
Node: The EBDB Database4407
-Node: Creating Records7959
-Node: Record classes9040
-Node: Record names9385
-Node: Record Fields10060
-Node: Inserting New Fields10304
-Node: Editing Existing Fields11100
-Node: Deleting Records and Fields11700
-Node: Field Types12096
-Node: Role fields14287
-Node: Tag field15975
-Node: Mail folder field16619
-Node: MUA Interaction16947
-Node: Loading MUA Code17471
-Node: Display and Updating18180
-Node: Pop-up Buffers18946
-Node: Auto-Updating Records19784
-Node: Noticing and Automatic Rules22184
-Node: Interactive Commands23517
-Node: EBDB and MUA summary buffers25879
-Node: Sender name display26365
-Node: Summary buffer marks27592
-Node: EBDB Buffers28771
-Node: Searching29953
-Node: Changing Search Behavior31615
-Node: The Basics of ebdb-mode32862
-Node: Marking36463
-Node: Exporting/Formatting36887
-Node: Completion37836
-Node: Snarfing39034
-Node: Internationalization41035
-Node: Diary Integration43734
-Node: Mail Aliases44599
-Node: vCard Support45313
-Node: Org Integration45812
-Node: Citing Records47710
-Node: Hacking EBDB48468
-Node: Field Classes50789
-Node: Init and Delete Methods53773
-Node: The Labeled Field Class55280
-Node: The Singleton Field Class56134
-Node: Actions56572
-Node: Custom Field Searching57244
-Node: Fast Lookups60048
-Node: Formatting in the EBDB Buffer61858
-Node: Writing Internationalization Libraries63871
-Node: Writing Integration For New MUAs68224
-Node: Article snarfing71643
-Node: Index72361
+Node: Creating Records8341
+Node: Record classes9422
+Node: Record names9767
+Node: Record Fields10442
+Node: Inserting New Fields10686
+Node: Editing Existing Fields11482
+Node: Deleting Records and Fields12082
+Node: Field Types12478
+Node: Role fields14669
+Node: Tag field16357
+Node: Mail folder field17001
+Node: MUA Interaction17329
+Node: Loading MUA Code17853
+Node: Display and Updating18562
+Node: Pop-up Buffers19328
+Node: Auto-Updating Records20166
+Node: Noticing and Automatic Rules22566
+Node: Interactive Commands23899
+Node: EBDB and MUA summary buffers26261
+Node: Sender name display26747
+Node: Summary buffer marks27974
+Node: EBDB Buffers29153
+Node: Searching30335
+Node: Changing Search Behavior31997
+Node: The Basics of ebdb-mode33244
+Node: Marking36845
+Node: Exporting/Formatting37269
+Node: Completion38218
+Node: Snarfing39416
+Node: Internationalization41417
+Node: Diary Integration44116
+Node: Mail Aliases44981
+Node: vCard Support45695
+Node: Org Integration46194
+Node: Citing Records48092
+Node: Hacking EBDB48850
+Node: Field Classes51171
+Node: Init and Delete Methods54155
+Node: The Labeled Field Class55662
+Node: The Singleton Field Class56516
+Node: Actions56954
+Node: Custom Field Searching57626
+Node: Fast Lookups60430
+Node: Formatting in the EBDB Buffer62240
+Node: Writing Internationalization Libraries64253
+Node: Writing Integration For New MUAs68606
+Node: Article snarfing72025
+Node: Index72743
End Tag Table
diff --git a/ebdb.org b/ebdb.org
index 8e7454e..7b62239 100644
--- a/ebdb.org
+++ b/ebdb.org
@@ -168,6 +168,16 @@ Typically, databases are saved using the {{{kbd(s)}}}
binding in
~ebdb-mode~ buffers, which runs ~ebdb-save~. By default, EBDB also
installs ~ebdb-save~ as part of the ~kill-emacs-hook~. Set
~ebdb-install-save-hook~ to nil to prevent this.
+
+#+CINDEX: Loading databases
+#+CINDEX: Database load times
+#+VINDEX: ebdb-try-speedups
+Loading and initializing the EBDB can be slow for large databases. If
+you find yourself annoyed by the wait, try setting ~ebdb-try-speedups~
+to non-nil. This will disable some checks performed during the object
+creation process, which theoretically shouldn't make a difference. If
+something does go wrong at load-time, however, try setting this back
+to ~nil~ first.
* Creating Records
:PROPERTIES:
:ID: 692cde31-73be-4faf-b436-7eae8a5d02d1
diff --git a/ebdb.texi b/ebdb.texi
index 849bed5..a28fca6 100644
--- a/ebdb.texi
+++ b/ebdb.texi
@@ -313,6 +313,16 @@ Typically, databases are saved using the @kbd{s} binding in
installs @code{ebdb-save} as part of the @code{kill-emacs-hook}. Set
@code{ebdb-install-save-hook} to nil to prevent this.
address@hidden Loading databases
address@hidden Database load times
address@hidden ebdb-try-speedups
+Loading and initializing the EBDB can be slow for large databases. If
+you find yourself annoyed by the wait, try setting @code{ebdb-try-speedups}
+to non-nil. This will disable some checks performed during the object
+creation process, which theoretically shouldn't make a difference. If
+something does go wrong at load-time, however, try setting this back
+to @code{nil} first.
+
@node Creating Records
@chapter Creating Records
- [elpa] externals/ebdb cbb4cc1 20/21: More complete error handling for field insertion, (continued)
- [elpa] externals/ebdb cbb4cc1 20/21: More complete error handling for field insertion, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb c298037 21/21: Bump version for 0.3.2, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 18be9ad 04/21: Add ebdb-field-bank-account class, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb dc5d03e 01/21: Change behavior of ebdb-fmt-compose-field, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 9c0947c 05/21: Comment out some custom definitions for address field, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 4a332dc 03/21: Add defgeneric for ebdb-read, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 767a9fa 07/21: Allow two kinds of searches on tags, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 8fc7b6d 08/21: Allow "fast lookups", Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb e3229ad 11/21: Give some indication that the migration process is ongoing, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb efd9e15 12/21: Provide an alternate threaded version of ebdb-initialize, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 2fa4379 14/21: New option ebdb-try-speedups,
Eric Abrahamsen <=
- [elpa] externals/ebdb 09a04b2 19/21: Fix up ebdb-string method for bank accounts, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb 2b52686 18/21: Check type spec of slots that may or may not accept an object, Eric Abrahamsen, 2017/09/17
- [elpa] externals/ebdb b3266e5 17/21: Apparently when-let will be obsoleted by when-let*, Eric Abrahamsen, 2017/09/17