Skip to content

Commit

Permalink
Remove json decoding when retrieving data from db
Browse files Browse the repository at this point in the history
* dump.lisp (sampledata-db-get): Remove json-decoding.  This fixes the
following heap error:

     Heap exhausted (no more space for allocation).
     274563072 bytes available, 2684355136 requested.
  • Loading branch information
BonfaceKilz committed Jan 12, 2023
1 parent 4a32a58 commit 94948e6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dump.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,9 @@ the hash stream"
"Get sampledata with KEY from DB. KEY may be a hash or a string. If
it is a string, it is encoded into octets before querying the
database."
(json:decode-json-from-string
(utf-8-bytes-to-string
(g3t db (if (stringp key)
(string-to-utf-8-bytes key)
key)))))
(g3t db (if (stringp key)
(string-to-utf-8-bytes key)
key)))

(defun sampledata-db-put (db data &optional metadata)
"Put DATA into DB. Associate HEADER, representing the name of the
Expand Down

0 comments on commit 94948e6

Please sign in to comment.