I wonder which method will be more efficient. I have around three hundred thousand DIV tags, which looks like this:
<div class="s" style="top:200px;left:100px;margin:0 2px 0 2px;">
here_comes_200chars_of_text</div>
Every single tag has different position and margin, that's why i can't put styles in css.
I want to put whole html code into a database, and load it from there when user needs it, and there comes my question. Is it better to store html like shown above, or to make it shorter with some php code to look like this :
<d c="s" s="t:200;l:100;m:0 2 0 2;">here_comes_200chars_of_text</d>
,upload it into database and recreate normal appearance when read?
It saves 20 chars per DIV. That makes ~6 million chars saved. That's why I'm asking.
I hope you get what I mean. Best regards.
EDIT:
Typical use of web app:
User is creating large group of html objects, each representing some kind of element on the map. There are around 200 users overall, each has his own map with objects, and at one time web app won't be used by more than 20-30 users. They store data in each element of the map, between DIV tags. They can dynamically move, change margin of the separate DIVs and change content in DIVs. After editing the map, users will be able to save their work in database. That's why I wonder how to save those DIVs, which are created and modified by user.
I hope it clears my problem a little:)