[Bug 623] New: hop.get(name) doesn't use cache

View: New views
5 Messages — Rating Filter:   Alert me  

[Bug 623] New: hop.get(name) doesn't use cache

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=623

           Summary: hop.get(name) doesn't use cache
           Product: Helma
           Version: 1.6.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Database Layer
        AssignedTo: helma-dev@...
        ReportedBy: joshua-helma@...


I've set loadmode = aggressive on a collection, and the first time I use
get(#), it fetches the full contents of the entire list and uses the cache for
subsequent get(#) calls. (I can tell because I'm logging SQL queries.)

But every time I call get(name), a new DB query is run to retrieve the child
with the matching accessname. I would expect the cache to handle this case as
well.

The collection, of course, is configured with an accessname.

I've worked around this with a new HopObject method I made analogous to
.list():

HopObject.prototype.hash = function(keyname) {
        var hash = {};
        this.forEach(function(h){ hash[h[keyname]] = h; });
        return hash;
}

Obviously the above assumes that you've already added forEach to HopObject,
which I have.


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 623] hop.get(name) doesn't use cache

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=623





------- Comment #1 from maksim.lin@...  2008-09-02 01:12 -------
I think the reason is that Helma doesnt keep the kind of index by accessname
that your example code creates and instead still indexes on the in the _id
proeprty, no matter what accessname property is set for a collection.
In my opinion it should and I think it would be a fairly small code change to
fix this.
It would be great to get this fixed soon, so I'm marking this for 1.6.3 and
will try to submit a patch for this soon.


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 623] hop.get(name) doesn't use cache

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=623


maksim.lin@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |1.6.3




------- Comment #2 from maksim.lin@...  2008-09-02 01:12 -------
I think the reason is that Helma doesnt keep the kind of index by accessname
that your example code creates and instead still indexes on the in the _id
proeprty, no matter what accessname property is set for a collection.
In my opinion it should and I think it would be a fairly small code change to
fix this.
It would be great to get this fixed soon, so I'm marking this for 1.6.3 and
will try to submit a patch for this soon.


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 623] hop.get(name) doesn't use cache

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=623





------- Comment #3 from hannes@...  2008-10-20 11:48 -------
I can't reproduce this. With or without loadmode = aggressive, a HopObject ony
gets queried the first time it is retrieved via get() from a named collection.
Can you provide a simple test case?


--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 623] hop.get(name) doesn't use cache

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://helma.org/bugs/show_bug.cgi?id=623


chris@... changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|1.6.3                       |1.6.4




--
Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev