Here are the newest results:
Switching off the Code Insight cache helped a little, but not for long. After some test cycles with my 500 KB package the "Virtual Size" (VS, measured with Sysinternals "Process Explorer") of Toad.exe sky-rockets to 2.3 GB, though I have only one connection and one editor with three tabs. With Toad 9.6 I worked on the same project, and the VS of this EXE never got over 450 MB. But 12.10 has far better Code Insight support, a more stable debugger and more improvements, so I really would prefer the new version.
I watched the VS of Toad 12.10 develop thru my work session, and it went like this:
- Starting Toad 12.10, with no DB connection open, the VS is about 500 MB
- After opening the connection, editor and loading the package source, the VS was about 700 MB, after doing some tests it slowly but surely climbed to 800 and little later to 1 GB.
- With time the VS steadily increases until it reaches 2+ GB, even 2.5 GB. Then, it eventually would freeze. But I have to admit, that there were two Oracle instances (11.2 and 12c) running on my computer (16 GB RAM, pagefile is now 17 GB!), and a SQL Server 2012 instance, all three together consuming about 35 GB Memory (!). This really was too much, so I shut down the Oracle 12c and the SQL Server instance, which I do not need for now (these alone occupied 30 GB VS !), and the freezing of Toad got significally better, at least it felt this way.
- After I rewrote the package and outsourced functional units into their own packages, I ended up with 4 packages (sizes 300, 130, 15 and 10 MB). At the moment, I see a VS of 1.6 GB, which is much, but not yet too much, I hope.
I feel that Code Insight is responsible for big parts of the VS, I tried and switched off all features I do not need. Especially global synonyms seem to play a role, but I'd like to have parameter support for SYS-packages like DBMS_LOB, UTL_FILE and some more (not many, there are 4 or 5, the rest just consumes memory). It would be fine, if you could specify the synonyms to load not in a global manner (all or nothing, though you can check "Do not load synonyms starting with "/""), but I'd like to configure Code Insight in this way: "Support only global synonyms starting with "DBMS_"", i.e. give a pattern for the global synonyms to support I think this could be an improvement in memory.
So it's still a special situation, Toad 12.10 has features I like very much (to name a few. refactoring, better code assistance, support of conditional pl/sql compilation, there may be many more), but for the moment it seems to take about 4 times the memory of Toad 9.6 working on the same project. I still have three weeks for evaluation, maybe someone can point out a way to keep memory consistently under 2 GB. I'll try and switch off global synonyms for code insight, the SYS-Package support is not that important.
I'll be back soon with more results ...