Re: New backend for Leo Cacher

2017-07-31 Thread vitalije

>
> ​Did you push master?  I don't see SQLITE=True in leoCache.py​.  And yes, 
> it's working for me.
>
> Edward
>

Done at a1043408d.

>  

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: New backend for Leo Cacher

2017-07-31 Thread Edward K. Ream
On Mon, Jul 31, 2017 at 3:51 AM, vitalije  wrote:

> I think I've been using this pretty consistently without any issues on
>> three installs - I only notice when I `git pull` and have to re-edit
>> leoCache.py.  So wondering if we should switch to True for everyone for
>> wider testing?
>>
>> I am also using this and few problems that I have noticed so far, I have
> fixed and pushed corrected version. There maybe some problems that will
> show up once more people start to use it. I will do my best to fix any
> problem reported ASAP. So, I am also for setting `SQLITE=True` in master
> branch.
>

​Did you push master?  I don't see SQLITE=True in leoCache.py​.  And yes,
it's working for me.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: New backend for Leo Cacher

2017-07-31 Thread vitalije

>
> I think I've been using this pretty consistently without any issues on 
> three installs - I only notice when I `git pull` and have to re-edit 
> leoCache.py.  So wondering if we should switch to True for everyone for 
> wider testing? 
>
> I am also using this and few problems that I have noticed so far, I have 
fixed and pushed corrected version. There maybe some problems that will 
show up once more people start to use it. I will do my best to fix any 
problem reported ASAP. So, I am also for setting `SQLITE=True` in master 
branch.

Vitalije

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: New backend for Leo Cacher

2017-07-30 Thread Terry Brown
On Tue, 18 Jul 2017 14:35:19 -0500
"Edward K. Ream"  wrote:

> On Tue, Jul 18, 2017 at 2:22 PM, Terry Brown 
> wrote:
> 
> > On Mon, 17 Jul 2017 11:05:51 -0700 (PDT)
> > vitalije  wrote:
> >
> > > Fixed at 8d6a7ab. My fault, sorry about that. Recently, I have
> > > switched to Python3, and now I am making Python2 crashers.
> >
> > I've switched SQLITE = True in three Leo installs and not seen any
> > problems since 8d6a7ab.
> >
> 
> ​Thanks for this report.  I'm going to play with this soon.

I think I've been using this pretty consistently without any issues on
three installs - I only notice when I `git pull` and have to re-edit
leoCache.py.  So wondering if we should switch to True for everyone for
wider testing?

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: New backend for Leo Cacher

2017-07-18 Thread Edward K. Ream
On Tue, Jul 18, 2017 at 2:22 PM, Terry Brown  wrote:

> On Mon, 17 Jul 2017 11:05:51 -0700 (PDT)
> vitalije  wrote:
>
> > Fixed at 8d6a7ab. My fault, sorry about that. Recently, I have
> > switched to Python3, and now I am making Python2 crashers.
>
> I've switched SQLITE = True in three Leo installs and not seen any
> problems since 8d6a7ab.
>

​Thanks for this report.  I'm going to play with this soon.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: New backend for Leo Cacher

2017-07-18 Thread Terry Brown
On Mon, 17 Jul 2017 11:05:51 -0700 (PDT)
vitalije  wrote:

> Fixed at 8d6a7ab. My fault, sorry about that. Recently, I have
> switched to Python3, and now I am making Python2 crashers. 

I've switched SQLITE = True in three Leo installs and not seen any
problems since 8d6a7ab.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: New backend for Leo Cacher

2017-07-17 Thread vitalije
Fixed at 8d6a7ab. My fault, sorry about that. Recently, I have switched to 
Python3, and now I am making Python2 crashers. 

Vitalije

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: New backend for Leo Cacher

2017-07-17 Thread Terry Brown
I got

setting leoID from os.getenv('USER'): 'tbrown'
reading settings in 
/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/config/leoSettings.leo
reading settings in /home/tbrown/.leo/myLeoSettings.leo

Leo 5.5, build 20170715081418, Sat Jul 15 08:14:18 CDT 2017
Git repo info: branch = master, commit = 14f589b8e8a3
Python 2.7.12, PyQt version 5.5.1
linux2
** isPython3: False
** caching enabled

sftp.py: can not import paramiko
reading settings in /mnt/edata/edata/edata.leo
redefining abbreviation html;;
from 
u'\n\n<|title|>\n\n\n\n\n<|content|>\n\n'
 to u'\n\n\n\n\n\n'
redefining abbreviation ,,
from u"{|{x='__NEXT_PLACEHOLDER'}|}" to u'__NEXT_PLACEHOLDER'
Found /help/aboutleo
redefining abbreviation html;;
from 
u'\n\n<|title|>\n\n\n\n\n<|content|>\n\n'
 to u'\n\n\n\n\n\n'
redefining abbreviation ,,
from u"{|{x='__NEXT_PLACEHOLDER'}|}" to u'__NEXT_PLACEHOLDER'
loadOnePlugin: can not load enabled plugin: leo.plugins.sftp
loadOnePlugin: can not load enabled plugin: leo.plugins.viewrendered
loadOnePlugin: can not load enabled plugin: leo.plugins.quickMove

Traceback (most recent call last):
  File "/home/tbrown/t/Package/leo/git/leo-editor/launchLeo.py", line 8, in 

leo.core.runLeo.run()
  File "/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/runLeo.py", line 
63, in run
g.app.loadManager.load(fileName, pymacs)
  File "/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/leoApp.py", line 
2099, in load
ok = lm.doPostPluginsInit()
  File "/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/leoApp.py", line 
2701, in doPostPluginsInit
c = lm.loadLocalFile(fn, gui=g.app.gui, old_c=None)
  File "/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/leoApp.py", line 
2938, in loadLocalFile
c = lm.openFileByName(fn, gui, old_c, previousSettings)
  File "/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/leoApp.py", line 
2975, in openFileByName
ok = lm.readOpenedLeoFile(c, fn, readAtFileNodesFlag, theFile)
  File "/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/leoApp.py", line 
3145, in readOpenedLeoFile
readAtFileNodesFlag=readAtFileNodesFlag)
  File 
"/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/leoFileCommands.py", line 
839, in openLeoFile
silent=silent,
  File 
"/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/leoFileCommands.py", line 
655, in getLeoFile
g.app.checkForOpenFile(c, fileName)
  File "/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/leoApp.py", line 
1126, in checkForOpenFile
g.app.rememberOpenFile(fn)
  File "/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/leoApp.py", line 
1164, in rememberOpenFile
d[tag] = aList
  File "/mnt/usr1/usr1_t/Package/leo/git/leo-editor/leo/core/leoCache.py", line 
848, in __setitem__
values(?,?);''', (key, data))
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a 
text_factory that can interpret 8-bit bytestrings (like text_factory = str). It 
is highly recommended that you instead just switch your application to Unicode 
strings.

[2]+  Exit 1  python 
/home/tbrown/t/Package/leo/git/leo-editor/launchLeo.py 
/mnt/edata/edata/edata.leo

Cheers -Terry


-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: New backend for Leo Cacher

2017-07-17 Thread Edward K. Ream
On Sun, Jul 16, 2017 at 3:28 PM, vitalije  wrote:

Commit 0e98b2073 contains new backend for leoCache.Cacher. New code is
> disabled by default by `SQLITE=False` switch in leo/core/leoCache.py
>

​Thanks for this.  I'll look at it asap.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


New backend for Leo Cacher

2017-07-16 Thread vitalije
Commit 0e98b2073 contains new backend for leoCache.Cacher. New code is 
disabled by default by `SQLITE=False` switch in leo/core/leoCache.py 

To try it set `SQLITE=True`. On next launch Leo will have to read and parse 
all external files, like it does after cleaning cache. But following 
launches should be as fast as they used to be with old backend cache. On my 
machine, new sqlite cacher is a bit faster.

On first run (with empty cache), opening LeoPyRef.leo:

read 150 files in 3.15 seconds

read outline in 3.37 seconds

Second run:

read 150 files in 0.53 seconds

read outline in 0.75 seconds

And with old PickleSareDB backend:

read 150 files in 0.71 seconds
read outline in 0.93 seconds

As you can see new code is a bit faster.

All unit tests pass both with switch on and off.
Vitalije

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.