So I was able to narrow the lag down to two functions in the code (which are called both in extract_obj and free_obj) for whatever reason.
The two functions can be found in dg_handler.c extract_script and free_proto_script. Both of these functions are almost identical. At either rate, I commented out both of these calls, and instantly lag is gone. However, this is obviously not a solution and will create wildly out of control memory leaks especially when dealing with this volume of items. Anyways, I thought I'd share my findings thus far here.