What it does is the following..
- Parse BBCode item tag
- Query database for existing Item name or Item ID (depending on the bbcode tag, i.e.: [item]Some Item[/item] will search by item name, [item=1234]Some Item[/item] will search by number.
- If item is found
- Return proper HTML replacement code
- If item NOT found in database
- Query wowhead.com/?item=Some+Item&xml
- process XML and save quality information, complete Item name, raw XML data and item id.
- Returns proper HTML replacement code
It does this for each item in the database. The only time you *should* have any "lag" in page view is when the post is first made and it has to query each item.
Of course, your posts should also be cached as already parsed templates, which the bbcode replacement wouldnt be done.