Attached path tweaks performance in a few ways:
- Only goes through the full replacement logic if strpos indicates that the replacement term is found within the body
- Statically caches configurations to reduce queries
- Offloads identifying nid based on html content to the database. If it can't match a nid, no replacements will be made.

Also fixes a bug I found where only one term was replaced even though multiple terms are on the page.

Comments

omerida’s picture

StatusFileSize
new7.18 KB

I've updated my patch to fix a couple of issues I ran into it on my site.

1) Loading nodes - is much lighterweight, in that it'll emulate calling nodeapi load for only the modules that are really needed (taxonomy, cck, and glossify).
2) Fixed blank content when the input filter was run on a non-node page
3) Fixed keeping the DOM state updated after making changes, fixed a case where the title tag for an A tag was being glossified

This also adds the option to specify tags to exclude from having their contents processed.

omerida’s picture

StatusFileSize
new8.71 KB

Updated to delete keywords when node is deleted.

omerida’s picture

StatusFileSize
new9.31 KB

Updated patch to replace more than one term within a parent element.

Ivo.Radulovski’s picture

Thank you so much for all your work, i will try to implement your fixes as soon as possible, it's just that my desk is full with other things right now.

omerida’s picture

You're welcome. We've been running this patched version of dev on our site (http://dcunited.com/) since Friday without any reported bugs so far.

Ivo.Radulovski’s picture

Now this is good news, may i ask if you used the prior version of glossify and/or what you think about the performance of the new version?

omerida’s picture

I was using the previous version, without any noticeable performance complaints, but it did break markup quite often, particularly script and embed tags. The new version doesn't break the tags, and having it as a filter format plugin is nice. The only thing with having it as a filter format, is that it'd be nice to have it work on arbitrary chunks of text, not just node bodies. For example, if I have a custom block, have it auto-link to node titles mentioned within the block.

Ivo.Radulovski’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.