You will only need to change that last few inches of cable outer at the derailleur to get a big improvement in performance. Changing the full length will be better though but takes longer.
For the rear part only, put the derailleur on the smallest cog and remove the cable end cap and check the cable hasn't un-twisted. Re-twist it if it has. Note the position of the cable in the clamp then undo the clamp bolt and pull the inner out then remove the outer cable. Be amazed at the rusty state of the ends of the cable reinforcements and general crudded up condition. If you haven't got a Park Tools cable cutter and a length of outer cable (which everybody should have) take the piece of outer down to a bike shop and get them to cut you a few pieces the same length. Ask them to grind the ends flat. Take them home. Open the inner sheath at both ends with something spikey. Clean the inner cable thoroughly by pulling it through some wire wool then dribble chain lube onto your fingers and run the cable through them, just enough to moisten the cable. Screw in both cable adjusters clockwise fully. Refit the plastic ferrules on the cable outer (shop should give you some clean new ones) with a dab of grease just to help keep water out. Carefully, twisting the outer clockwise so as not to splay the inner cable, push the inner into the outer and through then out of the other end, still twisting to help it come cleanly through the seal in the ferrule. Refit the outer to the frame and the derailleur. Carefully grip the inner with some pliers, not at the end and not tight enough to splay the strands, and keep it tight while holding it in the clamp behind the bolt. You might find that levering against the derailleur body will help get a good tension. Tighten the bolt finger tight on the Allen key but not tight enough to crush the cable. Then take the slack out of the cable by unscrewing the cable adjusters until the derailleur begins to move inwards and there's no slack left in it. Crimp on one of the cable end caps you persuaded the bike shop guys to give you. Then re-commence your adjustments. Ride the bike and be amazed at how much deterioration in performance you had come to accept as normal. Repeat every few months.