Movatterモバイル変換
[0]ホーム
[Python-Dev] Interning filenames of imported modules
Charles G Waldmancgw@fnal.gov
Wed, 10 Jan 2001 15:57:41 -0600 (CST)
I have a question about the following code in compile.c:jcompile (line 3678)filename = PyString_InternFromString(sc.c_filename); name = PyString_InternFromString(sc.c_name);In the case of a long-running server which constantly imports modules,this causes the interned string dict to grow without bound. Is therea strong reason that the filename needs to be interned? How about themodule name?How about some way to enforce a limit on the size of the internedstrings dictionary?
[8]ページ先頭