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!
chedemefedeme

Re: Speed up boot times

Unread post by chedemefedeme » 2014-01-21, 03:50

I havent dug into the code to see how/why it can handle this OK but I know two things about this:

1) It seems to elegantly handle a plugin/extension requesting the browser restart..installed a few under pale moon using it yesterday and had no issue.
2) There is a manual switch in its task bar icon to release its grip on the browser if you'd like.

Additionally, of course, any time the computer itself is restarted the browser gets reloaded. But mainly the first one. It seems to handle just fine an extension install requesting the browser to restart. It's a really cool little program. Not a huge boost on all computers I suppose but on my really low powered atom machine it makes a big difference.

Speaking of atom, Moonchild, did you see my post in the Atom build thread? I was really tickled to find you had made that build and left some experiences with it.

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

Re: Speed up boot times

Unread post by Moonchild » 2014-01-21, 11:39

Good news all around then! If someone has the time to compile it for Pale Moon then, it'd be an awesome addition (and I'll endorse it, of course).

Yes I saw your post on the other thread. I'll continue making ATOM builds, but they will not use the automatic updater, so you'll always have to manually update (to prevent an optimized build from being replaced with a generic build).
"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

jumba

Re: Speed up boot times

Unread post by jumba » 2014-01-21, 15:42

Interesting find! But the project has been marked as inactive and the last version build is from the year 2005! :shock:

I would assume that something has changed so it wouldn't work any more with the latest firefox/pm but I have no idea how it works really.

Edit: link to the home page on sourceforge is dead too.

chedemefedeme

Re: Speed up boot times

Unread post by chedemefedeme » 2014-01-22, 06:08

Yeah, it is old. But once again I report it works without flaw on latest Firefox and, in my several days of using Pale Moon now, seems to work just fine with it too. Being open source of course someone could pick it up and keep working with it. I just dont think anyone has because it is very simple and doesn't need frequent updates to do what it does.

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-26, 08:18

chedemefedeme wrote:Yeah, it is old. But once again I report it works without flaw on latest Firefox and, in my several days of using Pale Moon now, seems to work just fine with it too. Being open source of course someone could pick it up and keep working with it. I just dont think anyone has because it is very simple and doesn't need frequent updates to do what it does.
Do let us know if you end up customizing this for palemoon!

Edit- Actually I went through the source and did a quick and dirty find/replace of firefox->palemoon and Firefox->Palemoon. I'm going to bed while visual studio downloads/installs, maybe I'll have some success. It's time I actually did something proactive in learning real programming.

My only concern is this program is primarily 32bit. Optimally I'd compile it in 64bit for x64 palemoon- I expect this won't be so simple.

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

Re: Speed up boot times

Unread post by Moonchild » 2014-01-26, 10:46

Compiling for 64-bit shouldn't be too much of an issue with a simple program like this. Just make sure you use the x64 compiler/linker toolset (Usually found in $VS_INSTALLDIR\VC\bin\amd64, or with the appropriate settings from the IDE)
"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-26, 11:11

I'm having trouble getting it to compile at all.

I've had some help with fixing a few lines (apparently a few lines look like C and not C++ and are not compiling under vs2013), I commented out some lines involving ::GetVersionEx (edit- it's just something about the tray icon and pre XP system support), which also cause the compiler to fail.
edit- I also added an 'int' at the beginning of a few lines here and there, because the compiler complained about undefined types and "assumed int", but apparently won't compile with it's assumptions.

Now I'm getting this

1>CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
edit - I solved this by deleting the manifest.xml and removing references to it from the rc file.

edit nvm, got it to compile. Installing 32bit palemoon to test against.

edited for verbosity
Last edited by link68759 on 2014-01-26, 21:58, edited 3 times in total.

link68759

Re: Speed up boot times

Unread post by link68759 » 2014-01-26, 11:58

Disclaimer- I have absolutely no idea what I'm doing. I basically hacked through the code with a knife, hit my computer with a hammer and screamed like a dying crow until it compiled out of sheer pity for me.

http://sdrv.ms/1jS2tp5

This does weird things to the x64 version of palemoon. It opens a window that is supposed to be hidden I guess? Dissatisfied, it keeps opening more windows. I got it to stop once.

32 bit version of palemoon behaves better. I guess it's working, but I don't think it loads my session. Maybe it did? I honestly cannot remember which is a good sign I need to get some sleep.

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

Re: Speed up boot times

Unread post by Moonchild » 2014-01-26, 23:08

If you want to provide XP support, you may need to take extra steps in VS2013 (not familiar with 2013 myself, I use 2012 -- and even there I have to go through a few extra hoops to compile with XP support).
"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-26, 23:29

For now, I'm just concerned with seeing if it works at all, as I haven't yet tested thoroughly.

As far as the code goes, I believe the XP support (and even older) is all built in and ready to go- I've read that the problem is apparently GetVersionEx doesn't work with Windows 8.1, and I would need to use the updated equivalent.

There was something about 0x501 is the lowest supported OS vs2013 will compile for though, so that might be a problem. I suppose you can't just use g++ with a visual studio project?

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.

Locked