About certain questionable subdirectories under the Pale Moon source code

Talk about code development, features, specific bugzilla bugs, enhancements, patches, and other highly technical things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific referenced Bugzilla bugs, mercurial, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Most "bug reports" do not belong in this board and should initially be posted in Community Support or other relevant support boards.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Post Reply
User avatar
The Squash
Moon lover
Moon lover
Posts: 92
Joined: 2020-03-25, 19:31
Location: Location, location, location!

About certain questionable subdirectories under the Pale Moon source code

Post by The Squash » 2020-04-10, 22:39

I've been perusing the Pale Moon source code lately in a relatively uncoordinated manner so far, but I've come across several directories of very questionable value. I will introduce them one at a time in separate posts as each previous question is answered.

The first directory I have doubts about is called "hal". It's under the root of the Pale Moon source code tree. Based on the contents of this directory, it seems to be a miniature hardware abstraction layer for multiple operating systems, and it looks like a lot of the code dates back to the days of the Mozilla browser. One of the subdirectories under hal even contains files which seem to be a variety of platform-specific ways to immediately reboot the computer!

This question is part of a relatively long chain of questions about the Pale Moon source code. I want to clean up the Pale Moon source code a little bit, because I just built Pale Moon from source code and discovered that one of the object files (libxul) at one point in the compilation (I guess before it's stripped?) is over 800 MB. Even after stripping, libxul is over 70 MB, which I think is a little oversized for a Web browser core. I'm not complaining, I'm simply asking questions in hopes that I can safely remove these parts of Pale Moon and the community will prosper.

Thanks in advance.
THE GREAT TRAIN ROBBERY 2
NOBODY ON BOARD THE RUBY ON RAILS FEELS SAFE TONIGHT -- THERE ARE RUMORS OF A ZERO-DAY VULNERABILITY
"The whole film is a hack job." -- Guns N' Cowboys Flicks Magazine
IN THEATERS NOW
Rated PG-13 -- because the producer took some creative liberties...

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 7339
Joined: 2012-10-09, 19:37
Location: Binary Outcast

Re: About certain questionable subdirectories under the Pale Moon source code

Post by New Tobin Paradigm » 2020-04-10, 23:52

Please do not spam the forum asking about every component in the codebase. Also, HAL is NOT part of the "Pale Moon" codebase. It is part of the Unified XUL Platform.

UXP is much more than a "web browsing core" as you state. You really need to gain some perspective and learn the history of the codebase.

User avatar
Isengrim
Board Warrior
Board Warrior
Posts: 1166
Joined: 2015-09-08, 22:54
Location: 127.0.0.1
Contact:

Re: About certain questionable subdirectories under the Pale Moon source code

Post by Isengrim » 2020-04-11, 00:56

Allow me to make an attempt at education.

As Tobin said, UXP is much more than a browser core. Like the current Mozilla codebase, it is descended from the Mozilla Application Suite, which itself was an application platform that hosted many things:
  • Browser
  • Email & newsgroup client
  • Code editor
  • IRC client
  • Address book
The reason libxul is so massive is a result of all the platform's base functionality being linked into one giant shared object. This was a Mozilla design decision that was made a long, long time ago. In hindsight, breaking it up into smaller objects would probably have been a better approach; but trying to fix that now without also breaking everything in the platform (and likely putting a lot of other development on hold as a result) is no easy task, so it's not exactly high on the priorities list.
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (64-bit), Windows 10 build 1803 (64-bit)
"As long as there is someone who will appreciate the work involved in the creation, the effort is time well spent." ~ Tetsuzou Kamadani, Cave Story

User avatar
The Squash
Moon lover
Moon lover
Posts: 92
Joined: 2020-03-25, 19:31
Location: Location, location, location!

Re: About certain questionable subdirectories under the Pale Moon source code

Post by The Squash » 2020-04-12, 20:59

OK. Well, sorry for using the wrong terminology there. But there is one little thing that still bothers me:
New Tobin Paradigm wrote:
2020-04-10, 23:52
Please do not spam the forum asking about every component in the codebase.
Oh, no, I definitely wasn't going to ask about every component in the code base; I just wanted to know about a select few. In fact, I'll get off you back if someone just tells me what the HAL directory is for. If someone says "I don't know", I'll close this thread. If someone says "I do know... it's useless", I'll close this thread. I simply would like an answer to that question. I didn't realize that was considered spamming; I don't intend on being a spammer.

Now, by typing up a long response to such a simple objection, I'll bet I'm going to be considered a spammer big time now...
THE GREAT TRAIN ROBBERY 2
NOBODY ON BOARD THE RUBY ON RAILS FEELS SAFE TONIGHT -- THERE ARE RUMORS OF A ZERO-DAY VULNERABILITY
"The whole film is a hack job." -- Guns N' Cowboys Flicks Magazine
IN THEATERS NOW
Rated PG-13 -- because the producer took some creative liberties...

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 7339
Joined: 2012-10-09, 19:37
Location: Binary Outcast

Re: About certain questionable subdirectories under the Pale Moon source code

Post by New Tobin Paradigm » 2020-04-12, 21:31

Aside from code that might need a little cleanup we largely use hal/ for power states. Mozilla used it for lots-o-sensors or started to but we really only need to be able to know battery status and power configuration so that we don't drain batteries when on one and also if we should or should not prevent the display or system from going to sleep when say you are watching a full screen video but your display is set to turn off after five minutes of inactivity. That kinda shit.

I mean that is pretty obvious just going by file or function names.

User avatar
The Squash
Moon lover
Moon lover
Posts: 92
Joined: 2020-03-25, 19:31
Location: Location, location, location!

Re: About certain questionable subdirectories under the Pale Moon source code

Post by The Squash » 2020-04-13, 19:26

Well, I seriously couldn't figure out whether any of the code in there was actually useful. Thanks for the information. I won't ask any more questions about the subject. I know I sound quite a bit like a n00b but I don't mean to sound like one; if you knew me personally, you would know I'm actually a hard-core programmer, but sometimes I don't say things quite right.
THE GREAT TRAIN ROBBERY 2
NOBODY ON BOARD THE RUBY ON RAILS FEELS SAFE TONIGHT -- THERE ARE RUMORS OF A ZERO-DAY VULNERABILITY
"The whole film is a hack job." -- Guns N' Cowboys Flicks Magazine
IN THEATERS NOW
Rated PG-13 -- because the producer took some creative liberties...

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 7339
Joined: 2012-10-09, 19:37
Location: Binary Outcast

Re: About certain questionable subdirectories under the Pale Moon source code

Post by New Tobin Paradigm » 2020-04-13, 20:50

Stop by my channel. We'll see ;)

Post Reply