The viewers module is documented in Doxygen format in the source files.
Please run doxygen in the modules/viewers/documentation/
directory, then read the created documentation.
The viewer list is maintained through the viewers system. Edit the file module.viewers in the module's top-level directory, and then run the operasetup.py script as usual (this is normally done through the build system) to update the viewer list. You can also update the list manually by running the viewers.py script in the src sub-directory.
Viewers keeps some lists of objects in memory. Each object is quite small, but there might be quite a few of them (like the list of viewers/plugins). Overall, allocated memory should be in the KB range, not MB.
generated_viewers_data.inc includes a large array of pre-defined mime-types.
Memory is freed in ViewersModule::Destroy, called when terminating Opera.
Temp buffers are used in Viewers::InsertViewer, Viewers::FindViewer, Viewers::GetViewAction and Viewers::ConfirmViewer. Especially Viewers::GetViewAction should be trivial to rewrite.
module.viewers controls how many plugins should be known (and kept in the list in memory).
Viewers should be redesigned to not store as much data as it does now.