I was looking into onsite notification plugin to see why it was that slow and everything boiled down to this line of code:
$activity_url = qa_path_absolute(qa_q_request($parent['postid'], $parent['title']), null, $anchor);
responsible to make onsite notification take so long to list notifications