Git Product home page Git Product logo

array-keyed-map's People

Contributors

anko avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

array-keyed-map's Issues

Getting heap allocation error for a large entry size

I was trying to create an ArrayKeyMap of size 7,66,000 with each key of type
[int, string, 9 to 29 additional integers]

<--- Last few GCs --->

[31048:0000017180A75FD0]    14792 ms: Scavenge 2016.7 (2056.4) -> 2016.2 (2067.1) MB, 6.3 / 0.0 ms  (average mu = 0.161, current mu = 0.112) a
llocation failure
[31048:0000017180A75FD0]    14805 ms: Scavenge 2023.2 (2067.1) -> 2022.6 (2067.4) MB, 7.4 / 0.0 ms  (average mu = 0.161, current mu = 0.112) a
llocation failure
[31048:0000017180A75FD0]    14822 ms: Scavenge 2024.0 (2067.4) -> 2023.1 (2089.1) MB, 14.9 / 0.0 ms  (average mu = 0.161, current mu = 0.112)
allocation failure


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 00007FF60F11E3EF v8::internal::CodeObjectRegistry::~CodeObjectRegistry+111951
 2: 00007FF60F0ADA36 v8::internal::WebSnapshotDeserializer::context_count+65446
 3: 00007FF60F0AE8ED node::OnFatalError+301
 4: 00007FF60F9EA78E v8::Isolate::ReportExternalAllocationLimitReached+94
 5: 00007FF60F9D540D v8::SharedArrayBuffer::Externalize+781
 6: 00007FF60F857F0C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468
 7: 00007FF60F864AAF v8::internal::Heap::PublishPendingAllocations+1103
 8: 00007FF60F861ABA v8::internal::Heap::PageFlagsAreConsistent+2842
 9: 00007FF60F854B2F v8::internal::Heap::CollectGarbage+1967
10: 00007FF60F85D05B v8::internal::Heap::GlobalSizeOfObjects+315
11: 00007FF60F8A0A8B v8::internal::StackGuard::HandleInterrupts+891
12: 00007FF60F5A72E6 v8::internal::DateCache::Weekday+6902
13: 00007FF60FA72B11 v8::internal::SetupIsolateDelegate::SetupHeap+472849
14: 00007FF60FA4E7E0 v8::internal::SetupIsolateDelegate::SetupHeap+324576
15: 000001718268B110

Implement all the Map object's methods, so this is pretty much exactly equivalent

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map

It would be neato if this had all of that, and the readme could say "It's literally exactly Map, but the keys are arrays".

Tracking:

  • new Map()
  • new Map([iterable])
  • .size
  • [@@toStringTag]
  • [@@species] (unnecessary; we're not prototype-deriving from Map)
  • .clear()
  • .delete()
  • .entries()
  • .forEach()
  • .get()
  • .has()
  • .keys()
  • .set()
  • .values()
  • [@@iterator]()

is there a way to save the array-keyed-map as a file?

NOt an issue.
I am using array-keyed-map in my project. I would like to store my map as a JSON file. and I am writing multiple functions for different akmaps to save them to a file. I am just looking for a uniform way to store the akmap as a file.

thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.