Double cheek: Really slow

As soon as the headhunters arrive, the game freezes up. Is there some way to prevent this? This is my code:

  #Commented out to stop infinite loop.

# Kill at least 6 ogres on the left side.
# Then, collect at least 30 gold on the right.
# This variable is used for counting ogres.
defeatedOgres = 0;

# This loop is executed while "defeatedOgres" is less than 6.
while defeatedOgres < 6:
    enemy = hero.findNearestEnemy()
    if enemy:
        hero.attack(enemy)
        defeatedOgres += 1
    else:
        hero.say("Ogres!")

# Move to the right part of the map.
hero.moveXY(49, 36)

# This loop is executed while you have less than 30 gold.
while hero.gold < 30:
    # Find and collect coins.
    item = hero.findNearest(hero.findItems())
    if item:
        hero.move(item.pos)
    

# Move to the exit.
hero.moveXY(76, 32)

Could you email us to team@codecombat.com? Or if you know how could you give your sessionID?

How do I find sessionID?

Open dev-tools -> console -> find a string with sessionID.
But don’t worry, you can just email to team@codecombat.com and we will get your sessionId.


SessionID

Thanks. I see the problem. I’ll try to fix it ASAP.

P.S. I removed the url with sessionID from the post. (I copied it)

Could you check it now? I fixed some things there.