MMBase

Performance: All data is stored in the session

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.6.4
  • Fix Version/s: 1.6.5
  • Component/s: Editwizards
  • Description:
    Hide
    original bugid: #6084
    All data regarding wizards is stored in the session. This includes four xml trees: the 'original data' retrieved from MMBase, the 'user data' including changed and new objects, the wizard schema, and the 'form xml', which is passed to xsl and used to create a (html) form.
    All these objects stay active and in memory.

    The wizard schema is read and maintained in memory for every user that logs on - even if they use the same wizard. It woud make more sense if there would be a 'xml reader' class associated with the wizards. Thsi class can read teh xmls (and probably cache them), and pass them to wizards that need it. Everey user session will then have a refernce to a wizard retrieved by the reader, but since the wizard is not 'created' by the user session, more users can use the same instance of the wizard tree. In addition, by caching wizards, loading the xml can be sped up.

    The form xml is only used to create a html form - but the wizard somehow keeps it in memory. It may save memory if wizards discard the xml once it is used. The code that creates the form (in Wizard.java) could simply drop it (haven't checked yet if this would have consequences).

    Since MMBase has no locking mechanism, the wizard maintains a 'original data' xml tree. The Dove uses this tree to validate changes (so if someone changes the object, the wizard issues an error). Perhaps a less memory-consuming way can be found to check on changes in an object (so the original data tree is not needed), but I gather this would either require versioning (or 'last modified dates'), or another method to make comparison easy (hashcodes?).
    Wizards schemas are now cached.
    Form xmls are dropped after generation.
    The 'original data' tree is still kept in memeory though. Not sure if or when this can be changed, as some form of versioning/lockign should be implemented first.
    Also, it should be further researched what else is kept in memory that is unneeded.
    Show
    original bugid: #6084 All data regarding wizards is stored in the session. This includes four xml trees: the 'original data' retrieved from MMBase, the 'user data' including changed and new objects, the wizard schema, and the 'form xml', which is passed to xsl and used to create a (html) form. All these objects stay active and in memory. The wizard schema is read and maintained in memory for every user that logs on - even if they use the same wizard. It woud make more sense if there would be a 'xml reader' class associated with the wizards. Thsi class can read teh xmls (and probably cache them), and pass them to wizards that need it. Everey user session will then have a refernce to a wizard retrieved by the reader, but since the wizard is not 'created' by the user session, more users can use the same instance of the wizard tree. In addition, by caching wizards, loading the xml can be sped up. The form xml is only used to create a html form - but the wizard somehow keeps it in memory. It may save memory if wizards discard the xml once it is used. The code that creates the form (in Wizard.java) could simply drop it (haven't checked yet if this would have consequences). Since MMBase has no locking mechanism, the wizard maintains a 'original data' xml tree. The Dove uses this tree to validate changes (so if someone changes the object, the wizard issues an error). Perhaps a less memory-consuming way can be found to check on changes in an object (so the original data tree is not needed), but I gather this would either require versioning (or 'last modified dates'), or another method to make comparison easy (hashcodes?). Wizards schemas are now cached. Form xmls are dropped after generation. The 'original data' tree is still kept in memeory though. Not sure if or when this can be changed, as some form of versioning/lockign should be implemented first. Also, it should be further researched what else is kept in memory that is unneeded.

Activity

Hide
Pierre van Rooden added a comment - 2003-06-02 16:18
Performance: All data is stored in the session
All data regarding wizards is stored in the session. This includes four xml trees: the 'original data' retrieved from MMBase, the 'user data' including changed and new objects, the wizard schema, and the 'form xml', which is passed to xsl and used to create a (html) form.
All these objects stay active and in memory.

The wizard schema is read and maintained in memory for every user that logs on - even if they use the same wizard. It woud make more sense if there would be a 'xml reader' class associated with the wizards. Thsi class can read teh xmls (and probably cache them), and pass them to wizards that need it. Everey user session will then have a refernce to a wizard retrieved by the reader, but since the wizard is not 'created' by the user session, more users can use the same instance of the wizard tree. In addition, by caching wizards, loading the xml can be sped up.

The form xml is only used to create a html form - but the wizard somehow keeps it in memory. It may save memory if wizards discard the xml once it is used. The code that creates the form (in Wizard.java) could simply drop it (haven't checked yet if this would have consequences).

Since MMBase has no locking mechanism, the wizard maintains a 'original data' xml tree. The Dove uses this tree to validate changes (so if someone changes the object, the wizard issues an error). Perhaps a less memory-consuming way can be found to check on changes in an object (so the original data tree is not needed), but I gather this would either require versioning (or 'last modified dates'), or another method to make comparison easy (hashcodes?).
Show
Pierre van Rooden added a comment - 2003-06-02 16:18 Performance: All data is stored in the session All data regarding wizards is stored in the session. This includes four xml trees: the 'original data' retrieved from MMBase, the 'user data' including changed and new objects, the wizard schema, and the 'form xml', which is passed to xsl and used to create a (html) form. All these objects stay active and in memory. The wizard schema is read and maintained in memory for every user that logs on - even if they use the same wizard. It woud make more sense if there would be a 'xml reader' class associated with the wizards. Thsi class can read teh xmls (and probably cache them), and pass them to wizards that need it. Everey user session will then have a refernce to a wizard retrieved by the reader, but since the wizard is not 'created' by the user session, more users can use the same instance of the wizard tree. In addition, by caching wizards, loading the xml can be sped up. The form xml is only used to create a html form - but the wizard somehow keeps it in memory. It may save memory if wizards discard the xml once it is used. The code that creates the form (in Wizard.java) could simply drop it (haven't checked yet if this would have consequences). Since MMBase has no locking mechanism, the wizard maintains a 'original data' xml tree. The Dove uses this tree to validate changes (so if someone changes the object, the wizard issues an error). Perhaps a less memory-consuming way can be found to check on changes in an object (so the original data tree is not needed), but I gather this would either require versioning (or 'last modified dates'), or another method to make comparison easy (hashcodes?).
Hide
Pierre van Rooden added a comment - 2003-06-13 15:14
Performance: All data is stored in the session
All data regarding wizards is stored in the session. This includes four xml trees: the 'original data' retrieved from MMBase, the 'user data' including changed and new objects, the wizard schema, and the 'form xml', which is passed to xsl and used to create a (html) form.
All these objects stay active and in memory.

The wizard schema is read and maintained in memory for every user that logs on - even if they use the same wizard. It woud make more sense if there would be a 'xml reader' class associated with the wizards. Thsi class can read teh xmls (and probably cache them), and pass them to wizards that need it. Everey user session will then have a refernce to a wizard retrieved by the reader, but since the wizard is not 'created' by the user session, more users can use the same instance of the wizard tree. In addition, by caching wizards, loading the xml can be sped up.

The form xml is only used to create a html form - but the wizard somehow keeps it in memory. It may save memory if wizards discard the xml once it is used. The code that creates the form (in Wizard.java) could simply drop it (haven't checked yet if this would have consequences).

Since MMBase has no locking mechanism, the wizard maintains a 'original data' xml tree. The Dove uses this tree to validate changes (so if someone changes the object, the wizard issues an error). Perhaps a less memory-consuming way can be found to check on changes in an object (so the original data tree is not needed), but I gather this would either require versioning (or 'last modified dates'), or another method to make comparison easy (hashcodes?).
Wizards schemas are now cached.
Form xmls are dropped after generation.
The 'original data' tree is still kept in memeory though. Not sure if or when this can be changed, as some form of versioning/lockign should be implemented first.
Also, it should be further researched what else is kept in memory that is unneeded.
Show
Pierre van Rooden added a comment - 2003-06-13 15:14 Performance: All data is stored in the session All data regarding wizards is stored in the session. This includes four xml trees: the 'original data' retrieved from MMBase, the 'user data' including changed and new objects, the wizard schema, and the 'form xml', which is passed to xsl and used to create a (html) form. All these objects stay active and in memory. The wizard schema is read and maintained in memory for every user that logs on - even if they use the same wizard. It woud make more sense if there would be a 'xml reader' class associated with the wizards. Thsi class can read teh xmls (and probably cache them), and pass them to wizards that need it. Everey user session will then have a refernce to a wizard retrieved by the reader, but since the wizard is not 'created' by the user session, more users can use the same instance of the wizard tree. In addition, by caching wizards, loading the xml can be sped up. The form xml is only used to create a html form - but the wizard somehow keeps it in memory. It may save memory if wizards discard the xml once it is used. The code that creates the form (in Wizard.java) could simply drop it (haven't checked yet if this would have consequences). Since MMBase has no locking mechanism, the wizard maintains a 'original data' xml tree. The Dove uses this tree to validate changes (so if someone changes the object, the wizard issues an error). Perhaps a less memory-consuming way can be found to check on changes in an object (so the original data tree is not needed), but I gather this would either require versioning (or 'last modified dates'), or another method to make comparison easy (hashcodes?). Wizards schemas are now cached. Form xmls are dropped after generation. The 'original data' tree is still kept in memeory though. Not sure if or when this can be changed, as some form of versioning/lockign should be implemented first. Also, it should be further researched what else is kept in memory that is unneeded.

People

Dates

  • Created:
    2004-01-09 13:42
    Updated:
    2006-11-24 12:36
    Resolved:
    2006-11-24 12:36