Closed (fixed)
Project:
Homebox - Individual user dashboards
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Aug 2011 at 14:30 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
catchHere's a screenshot from webgrind showing the time spent.
Comment #2
drummThe only caveat I can think of is caching. But if a view can only be accessed by role, it had better be BLOCK_CACHE_PER_ROLE or other suitable configuration.
Comment #3
catchView access checks happen outside the caching (which is usually by query I think) - to get something from views cache you have to instantiate the view, and access etc. is all available there - caching only happens at the query execution and rendering points which are much later iirc.
Comment #4
drummHomebox does a bit of block caching, like the core block module does. I assume views works with this, but haven't confirmed.
Comment #5
catchI'll have a look at that tomorrow to see how it interacts. Views specifies CACHE_CUSTOM (or whatever no caching is) for its blocks, then caches internally, so if it respects what comes from block_list() should be OK.
Comment #6
drummThen I believe this is good. However, I have not actually run this code. (I was always wondering why this check existed, but never looked into it.)
Comment #7
catchAlright had a look through the homebox and views code.
homebox is respecting block cache modes.
Views uses BLOCK_NO_CACHE by default.
If in views admin, you specify that it should use block caching, then you can use per-role, per-page, per-user etc. - in that case views is handing off the caching to core block module (and not doing an access check) so it seems fine if homebox works the same for this.
I also have not run this code but it should hopefully get some testing this week.
Comment #8
brianV commentedJust updating this:
I never really understood the logic of this snippet either, but I didn't want to remove it before looking into it further, which it looks like you just did. Certainly, your logic seems sound.
Catch: did you have a chance to test this code, as your last post indicated you might?
Comment #9
brianV commentedDid some brief checking, then pushed to -dev for both D6 and D7.