Speed up boot times

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
megaman

Re: Speed up boot times

Unread post by megaman » 2014-01-27, 01:05

Yes, it seems to have come down to it all, one dependency after another on my end.
Now, I require "MSVCR120D.dll".

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-27, 01:17

Lol ok, hold on while I try to compile a release version and see if that stops the insanity.

I can't for the life of me figure out why "release" outputs a dll instead of an exe...

Uploaded that msvcr120d.dll

There is a tool called "dependency walker" that will list all dlls you need for a given program, and tell you which are missing.
-----------------------------------------------------
edit1
I managed to compile the release version (now uploaded), though I don't know if that will have any difference. Someone told me the way to get all the dlls packaged into one exe is to use the /MT flag in the linker, but it's not playing nice with MFC.

---------------------------------------------------
edit2

Seems I've run up against a bug in visual studio, as far as removing the dll dependencies. I think only mfc120u.dll msvcr120.dll and regclassu.dll are necessary now.
Last edited by link68759 on 2014-01-27, 04:22, edited 1 time in total.

megaman

Re: Speed up boot times

Unread post by megaman » 2014-01-27, 04:09

Took a snooze, but tried the program.
The other remaining dependencies are as follows:
[ ? ] MSVCR120D.DLL Error opening file. The system cannot find the file specified (2).
[D? ] API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL Error opening file. The system cannot find the file specified (2).
[D? ] API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL Error opening file. The system cannot find the file specified (2).
[D? ] API-MS-WIN-CORE-WINRT-L1-1-0.DLL Error opening file. The system cannot find the file specified (2).
[D? ] API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL Error opening file. The system cannot find the file specified (2).
[D? ] API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL Error opening file. The system cannot find the file specified (2).
[D? ] API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL Error opening file. The system cannot find the file specified (2).
[D? ] DCOMP.DLL Error opening file. The system cannot find the file specified (2).
[D? ] IESHIMS.DLL Error opening file. The system cannot find the file specified (2)
Uploading the full txt. file generated as a report.

Edit: Everything mentioned above is stated before I applied MSVCR120D.dll, but after placing the MSVCR120D.dll, the program started. Yet, the log still shows those other things needed as dependencies.

Edit 2: I can confirm this. I use the 64-bit version of Palemoon, and when the program is running I see windows popping-up non-stop. Palemoon loads-up in a blink of an eye, just how I wanted it from the beginning, nice work.

Edit 3: The non-stop pop-ups happened because I forced-closed the Pre-loader and opened while I had the browser running, I guess. Attempting to reproduce the error...Will report soon.

Edit 4: As you have mentioned, it does happen because I had the browser open and launched the pre-loader afterward, lesson learned.
Attachments
PalemoonPreloader.txt
(213.38 KiB) Downloaded 74 times

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-27, 04:25

IESHIMS and a few other things are always missing, never quite figured out why.

OK, I think you have an older build. I updated it to not need the d[ebug] dlls. Download everything again, to a different folder in case it doesn't work. I want to know if it doesn't work though.

After this I just have to figure out how to change the about dialog properties. It's hiding from me....

megaman

Re: Speed up boot times

Unread post by megaman » 2014-01-27, 04:30

link68759 wrote:OK, I think you have an older build. I updated it to not need the d[ebug] dlls. Download everything again, to a different folder in case it doesn't work. I want to know if it doesn't work though.
Success! It still requires the Regclass .dll but it opens without needing any other .dll. It also works as it did while I was testing it, less than 10 minutes but still time taken for the program.

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-27, 04:36

megaman wrote:
link68759 wrote:OK, I think you have an older build. I updated it to not need the d[ebug] dlls. Download everything again, to a different folder in case it doesn't work. I want to know if it doesn't work though.
Success! it still requires the Regclass .dll but it opens without needing any other .dll. It also works as it did while I was testing it, less than 10 minutes but still time taken for the program.
If it opened without needing the mfc120 and msvcr, (it will always need the regclassu.dll, the firefox preloader installer actually installs that for you) then that means the 2013 redist package I had you install is taking effect. So, Vs c++ 2013 x86 is still required.

The "debug" build used different dlls, though they were named the same, which is why it didn't work at first.

------------
Edit- Well, the only thing left to do is figure out how to change the about dialog, and maybe try building an x64 binary for fun.
-------------------

attaching the current latest build to this post. One more tester reports a success and I'll make a thread for it.
Attachments
Palemoon Preloader.7z
MD5: e061df11b2c6c905fe4b1c0aaa75520d
(28.89 KiB) Downloaded 73 times

jumba

Re: Speed up boot times

Unread post by jumba » 2014-01-27, 14:45

Really great that you had time for this! I tested it with PMx64 in windows 8.1 and it seems to be working just fine. The first launch is much quicker now so the preloading is working. As a quick testing I noticed it kept opening empty windows after restarting the browser when installing/updating add-on. I had to exit and re-open the browser. Also I think that the unloading options from the tray menu are not working, at least it doesn't close the currently opened windows or sessions as it should if I understood the tool-tip message correctly.

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-27, 17:38

I also had that issue at least once- a restart was processed as an exit and it kept trying to 'preload' it, when it had already started up again. The easiest way to avoid that is to not restart, just exit, but I'll see what I can do (I use restart all the time personally). No promises here though, it's a miracle I had the ability to compile it at all. Improvements are pretty far down the pipe.

As far as the unloading options not working- I'm calling that a happy accident. Why the heck should closing the preloader also force palemoon to exit? The only setback is that if you exit the preloader while palemoon is *not* running, a preloaded palemoon.exe will probably remain until the next time you start palemoon or kill it yourself. I haven't noticed any conflicts with sessions yet though, and IMO I'd rather have it this way than having it kill my opened browser should I want to close the preloader. Regardless, I'll look into it.

While trying to compile it with linking by trying to find a way to remove calls to _AFXDLL (not possible without a rewrite) noticed that I was *incredibly* fortunate that the code survived my find/replace of firefox->palemoon. Thank god VIM didn't match wordsfirefoxsurroundedbywords or I would have broke a few things. I'm guessing that the tray's unloading commands may have been one of the things butchered by me in this way, so there's my lead.

I should mention that vs2013 doesn't seem to readily let me compile for XP or lower- and even if it did, would the 2013 redist even install on XP? Either way, ASCII builds are *impossible*, because the non-unicode workspace/code are missing or corrupted or something. I'm not sure what versions of windows, if any, won't work with unicode programs, but I don't have the ability to compile ASCII at this time unless the original author has a working copy of that source.

Edit- Well, the latest regclass source doesn't have working ascii, at least. I think all that preloader uses regclass for is to check for existing firefox installations, and I can either try and remove it altogether for ascii support, or screw ascii and see if I can't get it to check the correct palemoon registry keys. I really don't know if ascii support is all that important though.

Jonny5isalivetm

Re: Speed up boot times

Unread post by Jonny5isalivetm » 2014-01-27, 19:02

Power to you man!

I asked for this Donkeys ago and was met with Palemoon starts fast enough blablabla :D

Totally EPIC!

Thanks very much :)

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Speed up boot times

Unread post by Moonchild » 2014-01-27, 19:22

Pale Moon does start fast enough. The preloader will just be for you impatient souls out there who think that a complex piece of directx-accelerated software can cold start and initialize in under a second. It will make your OS load up slower by using it, of course.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-27, 19:51

Moonchild wrote:It will make your OS load up slower by using it, of course.
Not as slow as having firefox/palemoon start at boot, since it isn't preloading extensions or session (from what I can see).

It's true that this will not save time in the limited scope of "computer power on -> palemoon open", but that is not the only use case of this preloader.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Speed up boot times

Unread post by Moonchild » 2014-01-27, 20:08

So, the preloader will have limited use - loading and initializing extensions is what usually takes the most time.
But, I guess if you chop a relatively long wait up in two chunks, it makes both of those waits matter less. :)
You should rename it "core preloader" or something?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-27, 21:40

Moonchild wrote:So, the preloader will have limited use - loading and initializing extensions is what usually takes the most time.
But, I guess if you chop a relatively long wait up in two chunks, it makes both of those waits matter less. :)
You should rename it "core preloader" or something?
No arguments there. I actually am not seeing a drastic improvement, with my many tabs and many extensions. Sure it might go from ~10s to ~7s now, but... anything over ~2s already interrupts my flow and once I'm in for a wait, another second or so hardly matters. I'm not sure if cutting off a negligible amount of time is worth having an extra process sitting in my RAM/tray 24/7 (I'm obsessive compulsive about that sort of thing).

I'm really just doing this as a learning experience, and because others seem happy with their results.

But yes, I think the idea behind this preloader(coreloader? softloader?) is keeping it ready to start *at all times*, so that the user may open and close it as often as he/she wishes and would perceive a reduced browser load time.

For me, I'm going to create an AHK script that fully loads the user session + extension, hidden, whenever the process exits (with a delay so it doesn't interfere with restarts). Then unhide the window when the title string changes (user clicked a url somewhere, or a shortcut that opens a newtab) If it works well, I'll post it here, or in the thread I may make for the preloader.

megaman

Re: Speed up boot times

Unread post by megaman » 2014-01-28, 00:16

link68759 wrote:I actually am not seeing a drastic improvement, with my many tabs and many extensions. Sure it might go from ~10s to ~7s now, but... anything over ~2s already interrupts my flow and once I'm in for a wait, another second or so hardly matters.
Okay, testing times.
I have 20 add-ons:
Warm-boots
Regular start without the Preloader is 8 seconds.
Start with Preloader is 1.5 seconds.
Extremely noticeable improvement.

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-28, 00:38

37 [enabled] extensions (47 extensions total)
76 tabs in this tab group, 112 tabs in session.
9 User scripts, 2 of which apply to all pages
15 user styles, 4 of which affect UI components of firefox

Warm boot: 11s
With preloader: 8s

Unfortunately I'm not reaping the benefits of my own labor, but I'm glad it's working so well for you. :)

Edit- with the preloader, palemoon opens immediately, but it takes 8 seconds to render the window. Without preloader, the window won't even pop up for at least 5 seconds.

megaman

Re: Speed up boot times

Unread post by megaman » 2014-01-28, 00:45

link68759 wrote:37 [enabled] extensions (47 extensions total)
76 tabs in this tab group, 112 tabs in session.
9 User scripts, 2 of which apply to all pages
15 user styles, 4 of which affect UI components of firefox

Warm boot: 11s
With preloader: 8s

Edit- with the preloader, palemoon opens immediately, but it takes 8 seconds to render the window. Without preloader, the window won't even pop up for at least 5 seconds.
Understood. I thought that I was going overboard with add-ons. You have bested me beyond belief.
Yes, even with a Preloader, you do have an excessive amount of things, but they work for you, so I don't question it.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Speed up boot times

Unread post by Moonchild » 2014-01-28, 01:56

@link: So, let me get this straight - you want 112 tabs, with 2 active user scripts for each tab, and 15 applied styles, and 37 active extensions, and the core, and hardware acceleration and back-end rendering engine, all to load and initialize in under 2 seconds? :lol: :roll:

Sorry, but 11 seconds is already pretty good for that, and I don't think <8 would be possible, period, considering the amount of work that needs to be done per tab. Shaving off those 3 seconds is nice, regardless.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-28, 02:15

I have pm set to not load a tab until I selected it, so if I understand this correctly, start up routines are working with 1 tab.
Last edited by Admin on 2014-01-30, 14:59, edited 1 time in total.
Reason: Flame-inducing content removed.

dark_moon

Re: Speed up boot times

Unread post by dark_moon » 2014-01-28, 05:20

It exist a option to load tabs until selected, yes.
But!: This didn't work for pinned tabs.
So if the user have many pinned tabs, PM loads they all at start ;)

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-28, 05:47

dark_moon wrote:It exist a option to load tabs until selected, yes.
But!: This didn't work for pinned tabs.
So if the user have many pinned tabs, PM loads they all at start ;)
Good to know. I've never really used the pin tabs feature- but having a way to 'always load this page on start' is a good feature.

Locked