A professional editor is very likely going to be the biggest expense, therefore you want to make the right choice when and who you let edit your work.
First of all you should make sure that your manuscript is in the best possible shape you can bring it in yourself. In the process of producing your final draft, you should also cut ever superfluous scene and even every word which does nothing to advance the story or its characters. Also cut all repetitions and redundancies. Since editors usually calculate their price by the word, money is a good a motivator to cut every excessive word.
Once you have done all of this, it is important to think about which kind of editor or what kind of editing services you need. One thing is for certain, depending on your writing experience, you are going to need at the least an editor for the copyediting if you want to produce a quality book.
Read more about the different stages of editing