Rockbox mail archiveSubject: new wps-file-loader
From: Stephan Wezel <s.wezel_at_arcor.de>
Date: Tue, 06 Dec 2005 23:37:57 +0100
i have created a new wps-file-loader.
The loading of a wps-file is done line-by-line.
This loader parses following tags through an seperate fn:
%x, %xl, %we, %d, # (comment-line)
This is done through an seperate fn because these tags are only
parsed/handled on loading a wps-file. So it is a waste of memory
to have lines with these tags resist in the format-buffer.
If one of these tags got handled due the sperate fn then the line
didn't gets into the format-buffer.
In the current implementation the reading is done directly to the
format-buffer (to avoid using a temp-buffer), so the handled line
will be either overwritten from a following line or the Null-Terminator
will be set after the last valid line.
With this loader the ram-usage of the format-buffer can be reduces ca.
by half and more.
(depending how many of %xl, %x and # are used )
e.g. the boxes.wps needs only 538 Bytes instead the 1759 Bytes(file-size).
the patch can be found here:
Received on 2005-12-06