It didn't take me that long. Because of how dedicated and how much I wanted to know the story, I would spend everyday trying to understand the lore of Kingdom Hearts. So, probably after Kingdom Hearts 2 is when I did my research and went deeper into the story. It took me about 2 years to finally understand the whole story. It was that long, mainly because I was playing Birth By Sleep at the time, and that just confused me even more. With Kingdom Hearts 2 I wasn't understanding the whole concept of Nobodies.
Tip: What helped me understand the story of Kingdom Hearts was reading the Ansem Reports. They explained SO many questions that I had been wondering and was confused about.