# List bug report

**URL:** <https://forum.dfinity.org/t/list-bug-report/8245>\
**Category:** Developers\
**Created:** [October 31, 2021, 7:59am UTC](https://forum.dfinity.org/t/list-bug-report/8245 "2021-10-31T07:59:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![honopu](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@honopu](https://forum.dfinity.org/u/honopu)\
**Post date:** [October 31, 2021, 7:59am UTC](https://forum.dfinity.org/t/list-bug-report/8245/1 "2021-10-31T07:59:35Z")

</div>

![1635666967797](https://us1.discourse-cdn.com/flex023/uploads/dfn/original/2X/5/5bc8d08172466e5108d94b4805f304179aa79bf2.jpeg)

1. Deploy to the ic network
2. Call the funciton initList to Initialize a list with length of 30000
3. Change the code “123” to “1234”
4. Deploy to the ic network

---

<div class="post-metadata">

**Author:** ![link2020](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/link2020/32/3418_2.png) [@link2020](https://forum.dfinity.org/u/link2020)\
**Post date:** [October 31, 2021, 10:51am UTC](https://forum.dfinity.org/t/list-bug-report/8245/2 "2021-10-31T10:51:18Z")

</div>

I also have this problem, how to do it? 😑

---

<div class="post-metadata">

**Author:** ![honopu](https://avatars.discourse-cdn.com/v4/letter/h/ecccb3/32.png) [@honopu](https://forum.dfinity.org/u/honopu)\
**Post date:** [October 31, 2021, 10:53am UTC](https://forum.dfinity.org/t/list-bug-report/8245/3 "2021-10-31T10:53:00Z")

</div>

Maybe use Array is one way to fixed it.

---

<div class="post-metadata">

**Author:** ![nomeata](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nomeata/32/733_2.png) [@nomeata](https://forum.dfinity.org/u/nomeata)\
**Post date:** [October 31, 2021, 2:14pm UTC](https://forum.dfinity.org/t/list-bug-report/8245/4 "2021-10-31T14:14:05Z")

</div>

A singly linked list is not a good data structure if you need to append things to the end. If you do that repeatedly, this has quadratic complexity. So yes, the solution would be to use an appropriate data structure for what you need.

(The error message is confusing, though. I would expect something like “failed to allocate memory”)
