Loop through entries taking far too long to finish
Something like this should work and be faster.

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;section = 'journalArticles';
$criteria-&gt;limit = 10;
$entries = $criteria-&gt;find();

$titles = array();
$copies = array();

foreach ($entries as $entry)
{
    $titles[] = $entry-&gt;title;
}

foreach (array_count_values($titles) as $val =&gt; $count)
{
    if ($count &gt; 1)
    {
        $copies[] = $val;
    }
}

$this-&gt;returnJson($copies);