Skip to content

cli-kintone requires huge amount memories #102

@ueokande

Description

@ueokande

Why

cli-kintone allocates a huge amount of memory when processing a lot of records. I tested importing CSV with 10,000 records. I measured memory usage of cli-kintone on macOS by the time command. As a result, cli-kintone requires over 500MiB memories. The memory usage size may be depends on number of records and each row size.

$ /usr/bin/time -l cli-kintone record import --app 12345 --file-path 10000_records.csv --update-key UUID
[2022-09-30T00:37:08.163Z] INFO: Preparing to import records...
[2022-09-30T00:37:22.321Z] INFO: Starting to import records...
[2022-09-30T00:37:48.261Z] INFO: Imported 2000 of 10000 records
[2022-09-30T00:38:23.053Z] INFO: Imported 4000 of 10000 records
[2022-09-30T00:38:50.967Z] INFO: Imported 6000 of 10000 records
[2022-09-30T00:39:17.246Z] INFO: Imported 8000 of 10000 records
[2022-09-30T00:39:47.250Z] INFO: Imported 10000 of 10000 records
[2022-09-30T00:39:47.250Z] INFO: Imported 10000 records successfully
      162.60 real         4.14 user         0.80 sys
           561577984  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              238914  page reclaims
                   0  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
               21327  messages sent
                1042  messages received
                   0  signals received
                  59  voluntary context switches
               57377  involuntary context switches
         38562478220  instructions retired
         19344958618  cycles elapsed
           375767040  peak memory footprint

What

Decrease memory usage; it independents on the number of records.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions