ludic.ui: negative numbers' texts made once per value like the positive ones, big ones kept by value in a ring of 16 (mm_int made a string per call for every coordinate), and a stylesheet without a comment is not copied to strip one
Found by the windowed walk's exit scan (mm_int 1.2 MB, lss_strip 451 KB unreachable). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2603a79cc4
commit
b30711877d
3 changed files with 40 additions and 1 deletions
|
|
@ -92,6 +92,7 @@ function lss_upto(r: UiRd, c: int) -> string {
|
|||
return out
|
||||
}
|
||||
function lss_strip(src: string) -> string {
|
||||
if not lss_has_comment(src) { return src } # no comment: nothing to strip, nothing made
|
||||
var out = ""
|
||||
var at = 0
|
||||
var i = 0
|
||||
|
|
@ -107,3 +108,9 @@ function lss_strip(src: string) -> string {
|
|||
if at < len(src) { out = out + src[at..len(src)] }
|
||||
return out
|
||||
}
|
||||
function lss_has_comment(src: string) -> bool {
|
||||
for i in 0 .. len(src) - 1 {
|
||||
if src[i] == 47 and src[i + 1] == 42 { return true }
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue