"RokuKC" wrote:
Also, 2573 roDateTime seems extreme.
"joetesta" wrote:
thanks - I've been trying to set everything = invalid in the debugger, going up / down and using var, but even after setting everything I can see to invalid it brought the GC count from 67k down to about 64k
"joetesta" wrote:
In the console when I delete large objects it doesn't seem to be having an impact. I'll delete a big object then bscs shows even more total...?
"joetesta" wrote:
We definitely don't need that much data, I just don't have control over the API so have to trim down what's there.
function deflate(json, deduper=invalid):
if deduper = invalid then deduper = { } : deduper.setModeCaseSensitive()
if getInterface(json, "ifAssociativeArray") <> invalid:
for each k in json:
json[k] = deflate(json[k], deduper)
end for
elseif getInterface(json, "ifArray") <> invalid:
for i = 0 to json.count() - 1:
json[i] = deflate(json[i], deduper)
end for
elseif getInterface(json, "ifString") <> invalid:
s = deduper[json]
if s = invalid then deduper[json] = json : s = deduper[json]
json = s
end if
return json
end function
BrightScript Debugger> foo = parseJson(bar)
BrightScript Debugger> ? runGarbageCollector(): foo = deflate(foo): ? runGarbageCollector()
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
Thanks for your patience — we’re excited to share what’s next!