Skip to content

Commit

Permalink
Disable clean_tags() on edit due to high load
Browse files Browse the repository at this point in the history
- Running clean_tags() after every save/edit of a post can cause a high
  load because it causes a lot of queries and can cause php to 500 from
  running out of memory.

Refs #53 #49
  • Loading branch information
MitchellMcKenna committed Nov 11, 2013
1 parent 22a309a commit ab656b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/models/item_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ function tag_item($tags = array(), $item_id = NULL)
// Nuke all item tags from orbit. It's the only way to be sure.
$this->db->delete('tag_relationships', array('item_id' => $item_id));

$this->clean_tags();
// Disabled due to php memory exceeded when a lot of tags exists
// TODO:: Find a more effectiant way of cleaning up tags.
//$this->clean_tags();

if (!empty($tags)) {
foreach ($tags as $tag) {
Expand Down

0 comments on commit ab656b8

Please sign in to comment.