GrampsAIO64 4.2.8 starting time

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GrampsAIO64 4.2.8 starting time

Hans Ulrich Frink-2
Dear Devs,
I installed grampsAIO64 4.2.8 on win10 and all rums well. Starting time is fairly fast.
Then I coppied some tweaked *.py files (mostly text and draw Resorts) into appropriate folders. Afterwards starting time is very slow. I think of two possible reasons: gramps is compiling the new files or windows is viruschecking those files on each start.
Does anyone find similar problems or any idea why this happens.
Cheers
Uli

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GrampsAIO64 4.2.8 starting time

enno
Hallo Uli,

Op 18-4-2018 om 15:00 schreef Hans Ulrich Frink:
> Dear Devs,
> I installed grampsAIO64 4.2.8 on win10 and all rums well. Starting
> time is fairly fast.
> Then I coppied some tweaked *.py files (mostly text and draw Resorts)
> into appropriate folders. Afterwards starting time is very slow. I
> think of two possible reasons: gramps is compiling the new files or
> windows is viruschecking those files on each start.
> Does anyone find similar problems or any idea why this happens.
I may have an idea, and it's based on a couple of thoughts:

1. When you install a program, the installer has free access to the
program files folder, where it puts all software files needed by Gramps,
including .py, and where at the end of install, compilation also creates
.pyc for each .py installed,

2. When you copy tweaked .py files, Windows will allow you to put those
there if you have a user have rights in the program files folder, which
is often the case if you have local admin rights,

3. When you run Gramps, Python will find the tweaked files, and try to
compile them, but at that time, Gramps does not have admin rights, so
Windows will not really allow access, but will secretly put the compiled
files in some other folder deeply hidden inside your application data
folder, called a virtual store. You can read more about that here:

https://superuser.com/questions/384107/why-cant-i-edit-a-program-files-file-on-windows-7

Now, when you run Gramps again, Python will not look inside this virtual
store, but only inside the program files folder where you installed
Gramps, where it will only find some .py files that are newer than the
.pyc files made during initial compilation, so it will compile things
again, and these files will again go to the virtual store, so that the
story will repeat itself until infinity.

I learned about this when I started tweaking files for Microsoft Train
Simulator in Windows 7, and found that the tweaks somehow disappeared,
even though I never saw an error message when tweaking them. That
tweaking was not copying, but editing text files while they were inside
the program files folder. This was no problem in Windows XP.

This system, which was introduced in Windows Vista, still exists in
Windows 10, and since I discovered it, I install all software that does
not have a separate data folder somewhere outside the program files
folder, meaning that my Flight and Train Simulators now sit in E:\FS9,
E:\TS1, etc., where I can tweak whatever I like.

You can test whether this really is causing the slowdown by
re-installing Gramps AIO in a folder like C:\GrampsAIO, or any one
folder to your liking, as long as it's outside the folders protected by
Windows. I use my E: drive for that, because that is a fast SSD.

Cheers,

Enno


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: GrampsAIO64 4.2.8 starting time

Hans Ulrich Frink-2
Thank you for the advice, Enno
I moved the whole GrampsAIO directory from c:\programs\ to c:\ 
Now there are compiled versions of my tweaked reports in __pycache__ directories.
This was the right thing to do as it made gramps start up as fast as before.
Perhaps running gramps with admin rights would also help.
Cheers
Uli


2018-04-21 15:12 GMT+02:00 Enno Borgsteede <[hidden email]>:
Hallo Uli,

Op 18-4-2018 om 15:00 schreef Hans Ulrich Frink:
Dear Devs,
I installed grampsAIO64 4.2.8 on win10 and all rums well. Starting time is fairly fast.
Then I coppied some tweaked *.py files (mostly text and draw Resorts) into appropriate folders. Afterwards starting time is very slow. I think of two possible reasons: gramps is compiling the new files or windows is viruschecking those files on each start.
Does anyone find similar problems or any idea why this happens.
I may have an idea, and it's based on a couple of thoughts:

1. When you install a program, the installer has free access to the program files folder, where it puts all software files needed by Gramps, including .py, and where at the end of install, compilation also creates .pyc for each .py installed,

2. When you copy tweaked .py files, Windows will allow you to put those there if you have a user have rights in the program files folder, which is often the case if you have local admin rights,

3. When you run Gramps, Python will find the tweaked files, and try to compile them, but at that time, Gramps does not have admin rights, so Windows will not really allow access, but will secretly put the compiled files in some other folder deeply hidden inside your application data folder, called a virtual store. You can read more about that here:

https://superuser.com/questions/384107/why-cant-i-edit-a-program-files-file-on-windows-7

Now, when you run Gramps again, Python will not look inside this virtual store, but only inside the program files folder where you installed Gramps, where it will only find some .py files that are newer than the .pyc files made during initial compilation, so it will compile things again, and these files will again go to the virtual store, so that the story will repeat itself until infinity.

I learned about this when I started tweaking files for Microsoft Train Simulator in Windows 7, and found that the tweaks somehow disappeared, even though I never saw an error message when tweaking them. That tweaking was not copying, but editing text files while they were inside the program files folder. This was no problem in Windows XP.

This system, which was introduced in Windows Vista, still exists in Windows 10, and since I discovered it, I install all software that does not have a separate data folder somewhere outside the program files folder, meaning that my Flight and Train Simulators now sit in E:\FS9, E:\TS1, etc., where I can tweak whatever I like.

You can test whether this really is causing the slowdown by re-installing Gramps AIO in a folder like C:\GrampsAIO, or any one folder to your liking, as long as it's outside the folders protected by Windows. I use my E: drive for that, because that is a fast SSD.

Cheers,

Enno


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel