FS#12289 - Skin comments take up space in the skin buffer

Attached to Project: Rockbox
Opened by Frank Gevaerts (fg) - Saturday, 24 September 2011, 16:59 GMT
Last edited by Jonathan Gordon (jdgordon) - Sunday, 25 September 2011, 13:03 GMT
Task Type Bugs
Category User Interface
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


At least in r30593 wps, sbs and fms comment lines seem to be stored in the skin buffer.

My testing used iLike for nano, on a sim. This theme uses 88K of skin buffer (more than the default allowance, I had to bump WPS_MAX_TOKENS a bit). Stripping comment lines reduces that to 63.7K. The comment lines take about 25513 bytes in the files, which is (almost?) exactly the difference.
This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Sunday, 25 September 2011, 13:03 GMT
Reason for closing:  Fixed
Comment by Jonathan Gordon (jdgordon) - Sunday, 25 September 2011, 02:56 GMT
I have no idea what's happening here! The comments are not being stored on the skin buffer (see libs/skin_parser/skin_parser.c skin_parse_comment() ) so I thught prehaps it is just allocating a LINE element for each one, but that doesnt seem to be happening according to the checkwps output (and elements are we'd need a few hundred to fill the buffer). But I can confirm that manually skipping leading comments at the begingin of the file does partially solve it, so there definitly is a bug (of course [saint]'s comment style can be said ot be broken also :) )

Comment by Jonathan Gordon (jdgordon) - Sunday, 25 September 2011, 03:20 GMT
err, that may actually be it.. the wps is doing 24KB of just skin_element structs, most being empty