About certain questionable subdirectories under the Pale Moon source code

Talk about code development, features, specific bugs, enhancements, patches, and similar 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 bugs, git, the repositories, 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. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

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.
The Squash

About certain questionable subdirectories under the Pale Moon source code

Unread 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.

New Tobin Paradigm

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

Unread 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: 1325
Joined: 2015-09-08, 22:54
Location: 127.0.0.1
Contact:

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

Unread 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.
a.k.a. Ascrod
Linux Mint 19.3 Cinnamon (64-bit), Debian Bullseye (64-bit), Windows 7 (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

The Squash

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

Unread 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...

New Tobin Paradigm

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

Unread 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.

The Squash

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

Unread 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.

New Tobin Paradigm

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

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

Stop by my channel. We'll see ;)

Locked