I see this module isn't in a healthy state. That's too bad because I really need it.

I'm willing to help try to rewrite this module. I contributed to this module once before a while ago to patch some major problems it was having. I'd like to try again.

Currently, the module creates a table #node X #roles big. So if you have a site with 10 roles and 5,000 nodes, you get a table 50,000. This seems pretty extreme. I always saw this as a major weakness to its scalability.

Wouldn't it be better to have one row for each node? Better still, wouldn't it be possible to set it up so that the taxonomay_access table is only #terms X #roles long? So if you had 50 terms and 10 roles, you would only need a table that is 500 rows large.

Comments

fgm’s picture

It looks as if the problem is a lot like the one chx just fixed with his new node access system.

His doc is at: http://drupal.org/node/33177

The problem was the size of a n-users x p-nodes access control table, and this problem seems to be n-users x p-roles access control, which is much of the same problem, only applied to different tables.

Maybe some unification on access control mechanisms could allow some code refactoring, and hopefully removal ?

moggy’s picture

I'm all for a rewrite.

This is something I need for my site. I had a look at it in regards to updating it for drupal 4.7 but a rehacking of a core module wasn't particularly appealing.

The existing hack, simply tied in tac. If we're going to have to hack it again I'd like to see a more generalised aproach, a new hook_taxonomy_access that other modules could make use of too. That might actually stand a chance of making it into the core then.

It seems to me that there are 2 areas that need addressing

  • a new more scalable database scheme
  • a better way of hooking into the taxonomy system.

It also seems to me that the work curently being done on the access control systems for Drupal could well benifit us in those aims, with a little bit of gentle steering.

Steve Dondley’s picture

Moggy,

As far as "the work being currently done" you mention, I assume you are talking about the thread pointed to by fgm above. Yes, that looks pretty promising from what I could gather of the idea. Seems like taxonomy_access could piggy back on it.

I'm waiting to hear back from chx what he thinks. I'm pretty rusty on how node access works.

Coyote’s picture

I hope my suggestion here isn't ignorant, but is a row required for everything, or only to _grant_ access?

In other words, do there need to be node_access entries that say "Nope, this row doesn't grant access", or do the entries just need to exist for things that _do_ grant access?

Coyote

keve’s picture

Title: Time for a complete rewrite? » Node_access table too big: Time for a complete rewrite?
Status: Active » Closed (won't fix)

Until new node access sytem, these ideas cannot be adapted.