Skip to content

Commit

Permalink
Avoid event during registration
Browse files Browse the repository at this point in the history
Registration gets very slow if the follow tag event  is triggered. During registration several objects are created (like widgets) which all trigger this event. Large user databases it will devastate performance of the registration process.
  • Loading branch information
gerard-kanters committed Aug 20, 2016
1 parent 48464d2 commit 7a9207c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions start.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ function follow_tags_init() {
elgg_extend_view('js/elgg','js/follow_tags/site');

// Run the followtags_notofy function in event is triggerd
elgg_register_event_handler('create', 'object', 'follow_tags_notify', 501);

if (elgg_is_logged_in()) {
elgg_register_event_handler('create', 'object', 'follow_tags_notify', 501);
}
}

function follow_tags_data_page_handler() {
Expand Down

0 comments on commit 7a9207c

Please sign in to comment.