I have an Xojo project that I save in XML format… and recently I noticed that the XML file is over 23.5meg in size
now there are a lot of graphics (860k if I examine the compiled bundle)… and I realize that XML stores that is HEX format in the project file… but even being generous and saying 5x the space required… that is only 4.3meg… there are 16,000 lines of code… again being generous say 100 char per line… that is 1.6meg
so I can account for 4.9meg… toss in 50% for “overhead” that is 7.5meg… what in the world is taking up the other 16 meg?!
When saved in BINARY format it is 13.1 meg
There is nothing “wrong”… I just noticed that it seems to jump in size all of a sudden.
Tim… 16,000 lines of code… I used 100 characters to line in my estimate… I’d say the average is closer to 50 (“ELSE” is only 4)
So I double the sourceline tags account for 16 meg of extra overhead, since they only add 33 characters per line
not sure what you mean by [quote=339097:@Tim Parnell]What’s wrong with the plain text format?[/quote]
[quote=339100:@Dave S]Tim… 16,000 lines of code… I used 100 characters to line in my estimate… I’d say the average is closer to 50 (“ELSE” is only 4)
So I double the sourceline tags account for 16 meg of extra overhead, since they only add 33 characters per line
not sure what you mean by[/quote]
The plain text format - the not XML, yet still VCS friendly format.
Have you read the XML? If there’s even a blank line it reads, <SourceLine> </SourceLine>. You have to add the length for <SourceLine></SourceLine> to every line you’re calculating. So your average 50 char line, is now 75. Every extra space line is now at least 25 characters (not even counting the indentations), and if you space a lot, you’re throwing in a lot of empty <SourceLine> </SourceLine> tags.
It’s all guesswork because I don’t know what your project looks like, but there could be a lot of wasted tags eating up space. Try switching to plain text.
You mean “VCS format”… which I find to be a pain (I like projects in one “package” (ie. file)… but that is my preference
but for the sake of this discussion… I saved it as such… and the sum total of all the files in the VCS folder was 12.1 meg of which 10 meg was all the graphics (I still not sure how 860k became 10meg even)
Lets see … app icons would be in there in their full glory
They’re not stored as references to items on disk
There’s a few like this that would take up a pile of space
Right, but it being in hex doesn’t say anything about comression. Say I’ve got a 1000x1000 pixel image that’s 4mb uncompressed. Compressed, it may take 300k of disk. I know that Xojo loads the image at runtime in uncompressed form. If you also store it that way in the VCS format, that would account for the difference in size. I thought images in XML and binary formats were stored as references, though.