Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to embed a readonly table in dll
    primarykey
    data
    text
    <p>My dll file requires some codepage conversion maps. Some strings need to be converted char by char. Currently I created several huge Dictionaries that hold these maps. These Dictionaries are so large that I had to split them up into 8 Dictionaries else C# didn't allow me to compile. Now it takes several seconds to load the application and it uses too much memory.</p> <p>I would like this to be a bit more efficient. Maybe I can embed a (or several) table in my dll and query it with sql or linq or something. Now I know a dll is not for storing data but my clients will appreciate a single .dll file. The table would only need to be readonly and hold ~62000 rows.</p> <p>Additional information:</p> <p>I have 10 codepages I need to convert to unicode AND back.</p> <p>6 of these codepages are single byte codepages and not a big deal. (6 * 256 * 2 = 3072 items)</p> <p>4 of these are double byte codepages, CP932, CP950, CP936 AND CP949, makes ~62000 * 2 = 124000 items</p> <p>I could leave out the first 128 chars of any charset, but that doesn't make much sense.</p> <p>If I could save this in a queryable something I only would have to save ~62000 + 1536 records and use them for converting both ways.</p> <p>Looking up chars in the current dictionaries is quite fast. The memory usage does not matter to much, the startup time bothers me most.</p> <p>The lookup has to be fast, the worst case scenario is that I have to convert about 20 sentences a second. Delay is not desirable, it has to keep up.</p> <p>Is it possible and what would be the best way to achieve this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload