Get a list of all enabled block deltas
I can't imagine why your site is crashing using the two functions you link to (Drupal calls them both internally so it certainly shouldn't be), but you can use the following custom query to grab that data directly from the database:

$query = db_select('block', 'b')
  -&gt;condition('theme', $your_theme_name)
  -&gt;condition('status', 1)
  -&gt;condition('region', -1, '&lt;&gt;');

$query-&gt;addExpression("CONCAT(module, '_', delta)", 'delta');

$deltas = $query-&gt;execute()-&gt;fetchCol();

// $deltas now contains a list of deltas for all enabled blocks in the provided theme