# Interesting idea : collection.media folder performance

**URL:** <https://forums.ankiweb.net/t/interesting-idea-collection-media-folder-performance/7640>\
**Category:** Suggestions\
**Created:** [February 19, 2021, 7:29pm UTC](https://forums.ankiweb.net/t/interesting-idea-collection-media-folder-performance/7640 "2021-02-19T19:29:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BookWorm](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@BookWorm](https://forums.ankiweb.net/u/BookWorm)\
**Post date:** [February 19, 2021, 7:29pm UTC](https://forums.ankiweb.net/t/interesting-idea-collection-media-folder-performance/7640/1 "2021-02-19T19:29:12Z")

</div>

whenever i try to open up the media folder it takes about 20 seconds to load 600 images . im worried that in 10 years those 600 images will turn into 10 000 !!!

a solution is to make anki place those images in folders which contain a certain maximum number of images

so lets say make anki place a max of 30 images in a subfolder (call it subfolder 1 ) inside the collection.media directory

once subfolder 1 fills up, anki should create another subfolder in the collection.media directory. this time it’s called subfolder 2.

keep repeating.

by the end of this process, I should have 20 subfolders in the collection.media directory.

to solve the problem of having too many subfolders in the collection.media directory anki should recognize that there are too many, which will then prompt the action of creating sub-subfolder

collection.media directory

&nbsp; &nbsp;&nbsp;subfolder1

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder1

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder1

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder2

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder3

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder4

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder5

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder6

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder7

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder8

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder9

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder10

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder11

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder12

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder13

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder14

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder15

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder16

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder17

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder18

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder19

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder20

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder2

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder3

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder4

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder5

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder6

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder7

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder8

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder9

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder10

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder11

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder12

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder13

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder14

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder15

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder16

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder17

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder18

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder19

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder20

&nbsp; &nbsp;&nbsp;subfolder2

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder1

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder2

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder3

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder4

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder5

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder6

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder7

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder8

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder9

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder10

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder11

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder12

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder13

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder14

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder15

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder16

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder17

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder18

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder19

&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;subfolder20

&nbsp; &nbsp;&nbsp;subfolder3

&nbsp; &nbsp;&nbsp;subfolder4

&nbsp; &nbsp;&nbsp;subfolder5

&nbsp; &nbsp;&nbsp;subfolder6

&nbsp; &nbsp;&nbsp;subfolder7

&nbsp; &nbsp;&nbsp;subfolder8

&nbsp; &nbsp;&nbsp;subfolder9

&nbsp; &nbsp;&nbsp;subfolder10

&nbsp; &nbsp;&nbsp;subfolder11

&nbsp; &nbsp;&nbsp;subfolder12

&nbsp; &nbsp;&nbsp;subfolder13

&nbsp; &nbsp;&nbsp;subfolder14

&nbsp; &nbsp;&nbsp;subfolder15

&nbsp; &nbsp;&nbsp;subfolder16

&nbsp; &nbsp;&nbsp;subfolder17

&nbsp; &nbsp;&nbsp;subfolder18

&nbsp; &nbsp;&nbsp;subfolder19

&nbsp; &nbsp;&nbsp;subfolder20

---

<div class="post-metadata">

**Author:** ![BookWorm](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@BookWorm](https://forums.ankiweb.net/u/BookWorm)\
**Post date:** [February 19, 2021, 7:41pm UTC](https://forums.ankiweb.net/t/interesting-idea-collection-media-folder-performance/7640/2 "2021-02-19T19:41:43Z")

</div>

probs hard to implement but it vastly improved performance. i tried it manually

---

<div class="post-metadata">

**Author:** ![khs](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/khs/32/3012_2.png) [@khs](https://forums.ankiweb.net/u/khs)\
**Post date:** [February 19, 2021, 7:51pm UTC](https://forums.ankiweb.net/t/interesting-idea-collection-media-folder-performance/7640/3 "2021-02-19T19:51:36Z")

</div>

What platform/OS? Most modern file systems accommodate huge amounts of files in in the same directory? It has to be something else.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [February 20, 2021, 11:44pm UTC](https://forums.ankiweb.net/t/interesting-idea-collection-media-folder-performance/7640/4 "2021-02-20T23:44:15Z")

</div>

Large folders only cause problems when you attempt to view a summary of their contents. Anki doesn’t do that, but you may do so if you’re browsing the files inside it. If your workflow involves reusing images across multiple cards, you can store your media files in a tree somewhere else on your computer, and select the files from there. If you select a file that is already in the media folder, Anki will not add a copy of it.

---

<div class="post-metadata">

**Author:** ![Andr](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/andr/32/1449_2.png) [@Andr](https://forums.ankiweb.net/u/Andr)\
**Post date:** [March 23, 2021, 9:59am UTC](https://forums.ankiweb.net/t/interesting-idea-collection-media-folder-performance/7640/5 "2021-03-23T09:59:59Z")

</div>

To simplify file searching I suggest having the same amount of levels in all branches at any given moment and generating the subfolder names from the names of the files: so `collection.media/hello.mp3` would become `collection.media/h/e/hello.mp3` if we currently have 2 levels of subfolders.
