There is not anything wrong with trying to work things out with someone if you feel it is worth the effort and the sacrifice. You have to set limits though because most of the time we get so wrapped up in trying to make something work that we lose perspective on how much of our time and resources are being used up in the process. So, when is it time to move on?
Start with a two simple questions. Are things progressing in a positive direction and have i done my best to help it get there? If the answer to the first question is NO, then ask yourself the second question. If the answer to that one is yes, then it is time to move on. You can't ask yourself to do more than your best and if things are still not moving in a positive direction then you aren't the problem. You are, more than likely, wasting your time and resources on someone who doesn't deserve you and may not even acknowledge or appreciate your efforts to begin with. Relationships all have two constants, if one them is not participating fully then it will fail maybe sooner, maybe later but failure is inevitable. Don't waste anymore time than necessary on someone who doesn't value or appreciate your best efforts.