Get wordpress formatted post content without including wordpress functions


Staff member
I'm creating a script that gets the content and meta of wordpress posts for an app, doing queries directly on the database because it's way faster than including the wp functions. However the problem is that the post content is saved into the db without formatting. I know that I can get it using

apply_filters('the_content', $content)

but as I said, I would like to avoid wp functions because they are really slow.

Is there any way to "simulate" apply_filters manually?
Is there a better(faster) way to include a wp function other than


which seems to be very slow?