Domino Connection
Domino Connection performs synchronous calls into
the C-API of Domino and adds some overhead used for object construction and
error handling. In fact a well written VisualAge Smalltalk Domino
Connection program is not considerably slower than a C program performing the
same task. On the other hand Domino Connection offers a fairly high
level of abstraction and a very convenient programming model. In some
situations it is useful to think about the abstractions and resulting
performance optimization. At the end of this section you will find two
sample applications: one written carelessly, the other optimized for
performance.
There are a number of ways to enhance performance on view
programming.
- openRebuild, update
- Database views are the most common tool to access structured data.
Views maintain indices on the documents in a database. Creating or
updating such an index can be time consuming, depending on the rate of change
within the database. If there is a lot of "traffic" in a database,
which means there are many inserts and deletions, recreating or restructuring
the index takes time. If you use the openViewRebuild:
method with AbtLnDatabase, you recreate the entire view every time
you send this message. As a more efficient alternative, you can open
the view with openViewRebuild: for the first time and then
only send the update message to the AbtLnDatabaseView instance to
refresh the contents. You might consider opening all views of an
application on initialization of the program and update them when
needed. This procedure can save a lot of time, but it allocates
resources for each view (on the database server system).
- Preparing views for fast access from Smalltalk
- If you look for specific documents in a database, consider building
specialized views for this purpose. Create views that have a small
number of relevant columns and simple or no column formulas and use simple
selection criteria. Access the column information via
AbtLnPseudoNotes and do not create real
AbtLnNotes. This will speed up searching the view.
Use views with multiple categories, which discriminate the database contents
in the way you want instead of iterating through a large number of
documents.
When you create documents, you can use the
newNoteFromForm: method with an
AbtLnDatabase. Understand that this method reads an
AbtLnFormNote, parses it's form definition, extracts field
definitions and passes them to the new document for initialization.
Instead of sending the newNoteFromForm: message many
times, read the form's structural information and initialize the
documents yourself, as demonstrated in the following sample programs.
[ Top of Page | Previous Page | Next Page | Table of Contents ]