There could several reasons why you have FPS problems. Generally, rendering 50000 independent objects is not leading to a good fps. Escpecially if you assigned to each entity a function that runs each frame. In addition, not knowing _what_ code you are executing makes people including you more "guessing" why you have such problems.

Can you post a screenshot or more details? Otherwise you won't receive much answers which are helpful, too.