For the last ten days or so, I have made almost no progress on the prototype, being very occupied by other stuff.
Today, I have made importer for python files. New model now handles at-auto for python files. Benchmark comparison with the present Leo's python importer gave the following results:
# importing pydoc.py from the Python Standard Library
import_py_new avg:40.0ms
import_py_legacy avg:552.5ms
# importing difflib.py from the Python Standard Library
import_py_new avg:24.9ms
import_py_legacy avg:420.1ms
# importing BaseHTTPServer.py from the Python Standard Library
import_py_new avg:9.3ms
import_py_legacy avg:137.2ms
It seems the new code is somewhat between 13 and 15 times faster.
The prototype needs more code polishing, documenting,... In its current state it is not very readable, at least some parts. I am not sure that it is a good idea to show it before it is ready. OTOH, I won't be able to work on it in the next two weeks.
The new auto_py function, which reads python source file and builds outline, is written at first using leoNodes.VNode class, and then adapted to use the new data model. It can be easily set as a replacement for the current python importer. It comes in pair with the new p_to_autolines function which returns a generator of text lines generated from an at-auto node.
I would like very much to delay publishing of all this code until it is fully polished and ready. But if you want to test the new code, I can share it in its current state as an alpha version. However, in that case, I must urge Edward not to make any decisions about the new code until it is fully ready. I am almost certain that it would be possible for both models to coexist for a while. The new model doesn't require any change in the Leo legacy code. Legacy code can delegate some tasks to the new model, where convenient. The new data model can be just one more plugin or core python file in Leo installation.
Vitalije