Dictionary Size

I am currently developing a C # website that uses very sophisticated code to create a search list, which I am currently designing as a structure similar to Tree.

The main reason I use the tree is the fact that this site has high traffic and a very sophisticated search filter, which means that scalability is very important, however I am concerned that the memory requirements of the tree may outweigh the effective processing requirements just recount values ​​every time.

Does anyone know of a reliable way to measure dictionary size in C #? The Marshal.SizeOf () method will not allow this, since the code is not unmanaged.

Cheers, Ed

+4
source share
3

- .

, , . . . , .

: ", ", .

+3

... , , , 1000 , , .

0

You can create a small application with one dictionary and then analyze it in several scenarios using WinDbg or ClrProfiler.

I don’t think there is a way to get the total size of an object at runtime (other than traversing internal fields using reflection?)

0
source

Source: https://habr.com/ru/post/1710143/


All Articles