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-26, 23:59

I got a missing dependency error, so it didn't start/work.

Edit: mfc120u.dll

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-27, 00:08

megaman wrote:I got a missing dependency error, so it didn't start/work.
You need both files in that skydrive folder. I should have zipped them together.

As long as palemoon is not running when you start the preloader, it seems to work just fine, even with palemoon x64. It doesn't seem to interface with firefox in any way, just external manipulation, so architecture doesn't matter.

It shaves 3-4 seconds off my startup time, and my session is not interrupted in any way. The way it works, by my observations, is it creates a hidden regular palemoon window with no extensions loaded(?). When you start palemoon, your session and extensions load. When you quit palemoon, all processes actually exit, but it soon starts the process again (hidden window), so it shouldn't interfere with restarts, as mentioned by chedemefedeme

However, I've still got a good 5-7 seconds. I think I can do better with AHK (loading palemoon entirely, hidden until you manually run it for the first time, etc).

I'll update the preloader to remove some references to "Mozilla Palemoon", change the icons, and throw it somewhere if anyone wants it, but I'm just not seeing enough results to justify it. On the other hand, it's simple enough where it would be a good learning project...

edit oh, um I'll look for that dll.
edit2 OK I uploaded the dll, it should be in that skydrive folder.
Last edited by link68759 on 2014-01-27, 00:15, edited 1 time in total.

megaman

Re: Speed up boot times

Unread post by megaman » 2014-01-27, 00:14

Hmm...now it wants MSVCR120.dll
Anyone else has tested this? It could just be my computer that has this issue.

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-27, 00:16

megaman wrote:Hmm...now it wants MSVCR120.dll
Anyone else has tested this? It could just be my computer that has this issue.
You need this package http://www.microsoft.com/en-us/download ... px?id=5555

I'm surprised you've never come across this error before- it's a common thing.

Edit- after you've installed that package, delete the mfc120u.dll and tell me if it still asks for it.
Last edited by link68759 on 2014-01-27, 00:20, edited 1 time in total.

megaman

Re: Speed up boot times

Unread post by megaman » 2014-01-27, 00:20

link68759 wrote: I'm surprised you've never come across this error before- it's a common thing.
I got "A newer version of Microsoft Visual C++ 2010 Redistributable has been detected on the machine."
I am fully-updated on Windows Updates.

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-27, 00:23

huh... I'm out of ideas. Maybe the x86 version of http://www.microsoft.com/en-us/download ... x?id=30679

You wouldn't get this through windows update.

I could just give you the dll, but then it might ask for another, and another, and so on. I'd just like to find out what package is required.

megaman

Re: Speed up boot times

Unread post by megaman » 2014-01-27, 00:32

link68759 wrote:huh... I'm out of ideas.
I could just give you the dll, but then it might ask for another, and another, and so on. I'd just like to find out what package is required.
Installed both X86 and X64, still receive the MSVCR120.dll error.
Correct, but if I got this error, someone else might as well. I'll hunt down the dependencies, until I arrive to stalemate(too tired, will sleep), or until I come upon a successful operation.

link68759

Re: Speed up boot times

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

I uploaded the dll- apparently you'd need a 2013 redist package, and it doesn't exist yet.

megaman

Re: Speed up boot times

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

link68759 wrote:I uploaded the dll- apparently you'd need a 2013 redist package, and it doesn't exist yet.
I just installed both the X86 and X64 of 2013.
http://www.microsoft.com/en-us/download ... x?id=40784
Now, I get mfc120ud.dll.

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-27, 00:56

Oh hey, you found it.

I just updated the icons and removed "Mozilla" in the main exe.

That dll is probably because I compiled the predefined "debug" settings. ASCII wasn't working and I wanted unicode anyway, and unicode is only set up as 'debug'. Not sure what that means.

Redownload everything and try it.

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: 35477
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

Locked