On Feb 7, 8:47 am, "Ville M. Vainio" <[email protected]> wrote:

> You can't get much simpler than pickleshare :-). Also remember that
> it's being used for stuff apart from hashcache.

I'm not sure I understand this remark.  I don't think it's used in Leo
for any other purpose.  Am I wrong?

Do you mean that pickleshare is more reliable than one might think
because it is used in other projects?  That may be so, but it hasn't
been updated recently, and there were crashers that I had to fix in it
to make it work with Python 3x.

But perhaps all this is moot.  I am inclined to leave path.py and
pickleshare.py alone.

Indeed, I have spent some time considering what would be needed to
remove the dependency on path.py.  It's more than meets the eye.  For
example, the splitall and relpathto methods would become global
functions.  It's not all that difficult, and in fact I have already
done that, but how would I test all the changes without unit tests?

Furthermore, while making the changes I have come to understand the
code :-)  There is a lot of complex path manipulations in the code,
and it would be quite foolish, imo, to imagine that I could improve on
that code without doing a lot of extra work.

So the new plan is to leave pickleshare.py and path.py unchanged.  I
can then concentrate on the real work, which is to optimize how Leo
uses pickleshare.py.   It remains to be seen whether this can be done
without altering pickleshare.py.  But with my newly acquired knowledge
that should be possible without risking wholesale changes.

I have been living in an important distinction lately, namely the
distinction between bug fixes and code cleanup.  I have done quite a
bit of code cleanup lately, but *only* when required to properly fix
bugs.  I have quite enough to do without gratuitously cleaning code.
Even the smallest cleanup requires rigorous testing.

This distinction is important here.  I consider Leo's caching code to
have a memory leak: it's creating too many files in .leo/db.  This bug
should be fixed for rc1.  But fixing that bug should not require huge
changes to pickleshare.py, and it would be inappropriate now to make
those changes unless they are necessary.

Edward

P.S.  I hope you all realize I am writing these notes to clarify the
issues in my own mind.  And to make sure Ville understands my
thinking.  I surely do not expect most people to be interested in
these low-level issues.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to