Jump to content
  • Advertisement
Sign in to follow this  
johnnyBravo

Is it ok to store a whole lot of data on one line of a text file?

This topic is 4969 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm storing information from a html form, by using java to save the text file. I was wondering if it matters to store everything on one line? As it would make it much easier to read/write. There will be quite a bit of text btw. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Sure. Actually, splitting things into multiple lines takes up more memory as you need two extra bytes (0x0D and 0x0A) for each line break.

[edit]edited for readability[/edit]

[Edited by - Sam Gamgee on February 9, 2005 11:25:47 PM]

Share this post


Link to post
Share on other sites
The only reason it matters is if you are going to (ever likely to) have to edit the file manually later.

Share this post


Link to post
Share on other sites
It won't hurt anything but if you're going to store things in text files anyway you probably want them to be at least sort of human-readable so I'd say you should put the linebreaks in. Some text editors will choke on if lines are extremely long.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!