diff options
| author | Michael Williamson <mike@zwobble.org> | 2020-09-13 16:27:34 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2020-09-13 16:27:34 +0100 |
| commit | 54467df8c6f06c2d4421ab5d0446d7cd8f5040e1 (patch) | |
| tree | d16b305a5268ee1386150e8c087bb19b7bc55fa5 /jq.pyx | |
| parent | 006b54f8f8698fd79bc634535664a85aaafc5280 (diff) | |
Add comment about performance for text()
Diffstat (limited to 'jq.pyx')
| -rw-r--r-- | jq.pyx | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -254,6 +254,10 @@ cdef class _ProgramWithInput(object): return _ResultIterator(self._jq_state_pool, self._bytes_input) def text(self): + # Performance testing suggests that using _jv_to_python (within the + # result iterator) followed by json.dumps is faster than using + # jv_dump_string to generate the string directly from the jv values. + # See: https://github.com/mwilliamson/jq.py/pull/50 return "\n".join(json.dumps(v) for v in self) def all(self): |
