We have had discussions regarding organizational techniques and that sort of thing, to help stay on task and avoid leaving people hanging. Some of these have had some degree of impact, but the general lack of performance compared to everyone else on the team persists. He's not terrible, and he does do decent work at times. He even takes initiative and has some good ideas, but it's often in the form of getting sidetracked on something relatively unimportant while critical tasks wait. And sometimes it seems very much like days are going by without him working on anything at all. (I certainly realize it is possible to spend a long time working out an algorithm or debugging or whatever, with little to show for it. This is different.)
I'm considering letting him go. But I'm torn for a few reasons. He has been with us for a long time now, and there hasn't been any particular egregious thing that seems to warrant that step now in particular. He's also a nice guy, so I would hate to do it. Plus, I'm concerned about the potential effect on team morale (although I'm sure some other developers have noticed the disparity as well).
I'm honestly not sure whether I'm just letting my desire not to hurt the guy color my judgement, and objectively I should clearly let him go, or if it's totally the other way around, and it's only my sociopath CEO side suggesting firing a loyal employee for not being exceptional. What would you do?