> >> Just noticed that for each request for a document in lenya-trunk, the > >> DefaultDocument class gets instantiated about 300 times (put some debug > >> output into the constructor to see it). > >> Could the DocumentBuilder somehow use the DocumentIdentityMap to prevent > >> multiple document instantiation? > >> Or might that lead to problems, e.g. with synchronization if multiple > >> threads access the same document simultaneously? > > > > > > I guess that the main reason for this behaviour is that the preconditions > > are verified for all usecases which are available in the menubar. > > I found out that this is not true. There is a bug somewhere, documents seem > to be instanciated multiple times for the same repository session.
I think quite a large number of document instances are created in input modules (and maybe other sitemap components). Many input modules use the following code: Document document = getEnvelope(objectModel, name).getDocument(); which 'often' creates a new instance of the document, because the InputModules don't seem to be re-used. My question is: How is this related to repository sessions? Should the input modules (or other sitemap components) use the repository session attached to the request to access the document? thanks, Josias > > -- Andreas > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
