-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit number of selected record in metadata / header #60
Comments
Looks like the main culprit in your case is somewhat deeper, i.e. you are investigating something like a network packet stream, which can be gigabytes long, and there are several aspects of parsing a huge stream of lookalike layered packets like these:
|
@GreyCat - I'm not disagreeing with you, but I am saying that you're wrong in this particular instance. For Kaitai Struct, as a thing, it obviously needs to do all of that. But web browsers -- and the WebIDE runs in a web browser -- have finite memory. The example file I used wasn't particularly huge, but it did repeatedly crash the browser because of the large number of DOM elements that were being generated. And I couldn't get to where I could use the The reason I suggested using the file meta-data is so that the WebIDE could process the tag and KSC (or whatever else) could just plain ignore it. |
My colleague, David, opened an issue in regards to viewing selected records. This is a slightly different request that is focused more on debugging than developing, though it may also be useful for development when the simple hack I've used doesn't work so well.
At present the only way to limit the number of records which are selected is to use the
hooks
filter described in #50 . This works reasonably well in that it prevents the web IDE from blowing up when too many objects are created, though it can require a bit of trial and error.I have a
nodeFilter
function which deselects the records with formats / definitions that I've debugged. As each format is debugged, I alter therepeat-until
condition I'm using to include more of the file.What I really want is something a lot closer to this expression, except I want
records
to be the number of nodes which were selected byhooks.nodeFilter
and not the number which were read from the input file --With the above code, the parser reads up to 1000 records. If there are no desired records, based on the
nodeFilter
expression, nothing shows up. And then I have to go back and change the1000
value to something bigger. Lather, rinse, repeat.The text was updated successfully, but these errors were encountered: