开发者

Store procs in a hash (lots of them)

开发者 https://www.devze.com 2023-03-22 17:36 出处:网络
I may be into a situation where I might potentially have hundreds or maybe thousands of blocks within a program, being indexed by a hash. I\'m experimenting with metaprogramming and I\'m wondering if

I may be into a situation where I might potentially have hundreds or maybe thousands of blocks within a program, being indexed by a hash. I'm experimenting with metaprogramming and I'm wondering if this might increase the memory overhead too much (开发者_如何学Goprocessing won't be a problem after the application loads, since they won't be constantly operating and I think this might still be faster than reading an xml file of epic proportions).

Basically, I have lots tiny programs I'm handling as data. How far can I go with blocks before this "data" needs to be managed the old-fashioned way, by some external source, like databases and xml files?


"Thousands" is not going to be a problem. Just do it.

When you get into millions, then you might have to reconsider.

0

精彩评论

暂无评论...
验证码 换一张
取 消