aboutcode-org / aboutcode-org/scancode-toolkit

MemoryError when scanning 100 MiB single-line JSON file

Đang mở
#958 14 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug Priority: low
Ngôn ngữ chính
Python
Star
2.6k
Fork
791
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
5

Mô tả

Slightly related to #616 (which is about the json2csv tool), I also see an error when scanning a (close to) 100 MiB JSON file with ScanCode version 2.2.1.post277.4d68f9377, on both Linux and Windows. I'm wondering whether ScanCode is still trying to interpret the JSON instead of handling it as a BLOB despite my not specifying the `--package` option, and whether that's causing the huge memory usage.

My full command line is

scancode --copyright --license --license-text --info --only-findings --strip-root --timeout 300 --processes 15 /dir/to/scan --json-pp result.json

Answering @pombredanne's question from #616:

> JSON should not be treated as plain data when this is compact, single line.
> Is this file a single line, like a huge js.map map file?

Yes, it is.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.