Click here to Skip to main content
15,888,590 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Maybe my least favorite programming task other than CRUD creation Pin
honey the codewitch9-Dec-20 1:25
mvahoney the codewitch9-Dec-20 1:25 
GeneralRe: Maybe my least favorite programming task other than CRUD creation Pin
Fueled By Decaff9-Dec-20 3:19
Fueled By Decaff9-Dec-20 3:19 
GeneralRe: Maybe my least favorite programming task other than CRUD creation Pin
jsc429-Dec-20 2:51
professionaljsc429-Dec-20 2:51 
GeneralRe: Maybe my least favorite programming task other than CRUD creation Pin
PIEBALDconsult9-Dec-20 3:19
mvePIEBALDconsult9-Dec-20 3:19 
GeneralRe: Maybe my least favorite programming task other than CRUD creation Pin
honey the codewitch9-Dec-20 3:22
mvahoney the codewitch9-Dec-20 3:22 
GeneralRe: Maybe my least favorite programming task other than CRUD creation Pin
PIEBALDconsult9-Dec-20 3:49
mvePIEBALDconsult9-Dec-20 3:49 
GeneralRe: Maybe my least favorite programming task other than CRUD creation Pin
honey the codewitch9-Dec-20 3:54
mvahoney the codewitch9-Dec-20 3:54 
GeneralRe: Maybe my least favorite programming task other than CRUD creation Pin
PIEBALDconsult9-Dec-20 6:47
mvePIEBALDconsult9-Dec-20 6:47 
honey the codewitch wrote:
a low level pull based parser


I'm unsure what you mean by that, but it's likely to be about what I mean. Maybe yours is more generalized, while mine is JSON-specific.


Mine was designed primarily to quickly iterate the members of arrays within some large JSON files (20GB?) so the data contained can be written to SQL Server.
It also reads an element at a time, and builds up an Object as it goes, then passes each complete Object on for processing (writing to SQL Server) individually, so I have only a few Objects in memory at a time (determined by how many threads I'm using). So I don't load the whole file into memory at one time.

So, I may have a file which contains a number of arrays. I tell my utility to Read() the file a piece at a time and "when you find an array named 'Foo', load the Foo table with its contents ; when you find an array named 'Bar', load the Bar table ; etc." and then each requested array has its contents iterated object-by-object by some number of threads, processed, and written to SQL Server. I assume this is similar to your ParseSubtree()
Non-requested arrays and objects don't become full Objects, this is likely similar to your SkipSubtree() except for that it's really just Read()ing until it finds something it was told to look for -- it won't skip a subtree within an object it has been told to read.
Most files I'm reading contain only one big array each. And some JSON files I generate I segment into several parts to ease handling of them.

Filtering out parts of an Object happens after each Object has been fully populated, which allows the process to support more complex filtering requests.
GeneralRe: Maybe my least favorite programming task other than CRUD creation Pin
honey the codewitch9-Dec-20 6:52
mvahoney the codewitch9-Dec-20 6:52 
General/dev/null as a service PinPopular
Brisingr Aerowing8-Dec-20 15:19
professionalBrisingr Aerowing8-Dec-20 15:19 
PraiseRe: /dev/null as a service Pin
Daniel Pfeffer8-Dec-20 19:31
professionalDaniel Pfeffer8-Dec-20 19:31 
GeneralRe: /dev/null as a service Pin
Johnny J.8-Dec-20 21:03
professionalJohnny J.8-Dec-20 21:03 
GeneralRe: /dev/null as a service Pin
5teveH8-Dec-20 21:30
5teveH8-Dec-20 21:30 
GeneralRe: /dev/null as a service Pin
k50549-Dec-20 3:51
mvek50549-Dec-20 3:51 
GeneralRe: /dev/null as a service Pin
5teveH9-Dec-20 4:05
5teveH9-Dec-20 4:05 
GeneralRe: /dev/null as a service Pin
BabyYoda9-Dec-20 2:57
BabyYoda9-Dec-20 2:57 
GeneralRe: /dev/null as a service Pin
Jörgen Andersson9-Dec-20 5:51
professionalJörgen Andersson9-Dec-20 5:51 
GeneralI did not realize... Pin
David O'Neil8-Dec-20 13:44
professionalDavid O'Neil8-Dec-20 13:44 
GeneralRe: I did not realize... Pin
Greg Utas8-Dec-20 13:54
professionalGreg Utas8-Dec-20 13:54 
GeneralRe: I did not realize... Pin
Nelek8-Dec-20 21:49
protectorNelek8-Dec-20 21:49 
GeneralRe: I did not realize... Pin
Greg Utas8-Dec-20 23:38
professionalGreg Utas8-Dec-20 23:38 
GeneralRe: I did not realize... Pin
Rick York8-Dec-20 14:29
mveRick York8-Dec-20 14:29 
GeneralRe: I did not realize... Pin
Dan Neely9-Dec-20 2:30
Dan Neely9-Dec-20 2:30 
GeneralRe: I did not realize... Pin
David O'Neil9-Dec-20 6:43
professionalDavid O'Neil9-Dec-20 6:43 
GeneralRe: I did not realize... Pin
Dan Neely9-Dec-20 6:55
Dan Neely9-Dec-20 6:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.