Jump to content
ibmxt286

Javascript slows down a G4

Recommended Posts

when using classilla i have noticed javascript slows down a g4 quite a bit. are there any alternatives? I wanna put a G4 on Mac OS 9 into daily use on eBay, craigslist, news browsing, et cetera.

Share this post


Link to post
Share on other sites

JavaScript slows down far newer and faster machines. Your best bet would be aggressive NoScript usage to only whitelist the bare minimum. (Which is a good idea on any system. Or just not use a G4 as a daily driver, but as a retro thing.)

Share this post


Link to post
Share on other sites

why is that? its just the web. HTML. It used to be that a pentium 100mhz could browse the web quite quickly even with a modem. Now, it takes forever to render a page even on old core duo machines. its like you need server grade hardware to render a website. I'm a hardware guy so I don't have the slightest comprehension of how software really works coding wise. WTF happened between 1995 and now that makes a web page so vastly different.

Share this post


Link to post
Share on other sites

In 1995, the web was designed with the idea that you have (at absolute best, this probably wasn't even common then) a Pentium 100. Over the years, as connection speeds and local computing horsepower have increased, so have the complexity of web pages.

 

Some of it's pretty shenanigans, like tracking tools and ads that themselves consume a lot of RAM, but you can easily go to apple.com in Chrome on a modern computer and see that it used 300 megs of RAM to render and display the page. (a theverge.com tab was 200 megs, which was interesting because theverge.com is often hailed as the heaviest site on the Internet.)

 

Even this site uses around 60 megs of RAM as it loads and renders on my computers.

 

Most of the web as we have it today simply couldn't be built on technology that existed in 1995. For better or worse, it's just the way things are. You really need a newer computer if you're going to use the web.

 

The good news is you don't actually have to buy a brand new computer. A late Pentium 4 or Pentium D with some upgrades running Windows 10 or any Mac (which is like, late 2009 and forward) running Sierra should be able to do web tasks just fine.

Share this post


Link to post
Share on other sites

Two more things:

 

I realize that this was about a G4. Which G4? It's very possible that although not faster, if you can run OS X 10.4 or 10.5, TenFourFox will do better than Classilla does. Either is going to get bogged down by JS because no G4 is particularly fast by modern standards, but tenfourfox on OSX is less likely to randomly crash halfway through.

 

 

There have been discussion of ways to make web browsing more possible on 68k Macs. There's no reason these techniques couldn't be used on a more modern system. There's even some other techniques (like X11 forwarding) that you can pretty reasonably use on a G4, but really not on, say, an '040.

 

Ultimately though, eBay and news sites are some of the worst about this and they'll generally become noticeably better if you just use a faster computer with a more modern web browser. G4s quickly became slower (to the point where you have to choose a very slow P4 and then buy a G4 that's several years newer than it for a G4 to be faster than a P4) in the early 2000s and Classilla, while a valiant and important effort, does not really do the modern web justice. Think of Classilla as a slightly-better-than-IE5 way to browse Mac Garden, not as something you can really go on eBay, or news web sites with.

 

 

If you insist on using a computer from the early 2000s, buy a PC and put Windows 7/8/10 or Linux on it. Then, you can run current browsers and you'll still wait for everything, but it'll actually load.

 

The modern web uses a lot of resources, but modern computers have scaled up well in performance and speed to deal with it. Consider, for example, that 4 gigs of RAM is the absolute minimum you see these days. 8GB is more common and people who run a lot of programs or leave a lot of web tabs open are starting to trend toward 16. Modern desktop platforms support 64. Modern ultrabook-class dual core CPUs are now fast enough that they're nearly outperforming quad-core CPUs that are a bit less than ten years old. It might even happen for a higher end dual than the one I'm using.

 

The web has gotten fat, but hardware has gotten amazing and everything else is either stable or is getting more efficient.

Share this post


Link to post
Share on other sites

Um, use 10.4.11 and TenFourFox? Blind guess, but maybe 9 doesn't have the best support for G4?

 

I'm guessing there's an awful lot of javascript running around and I don't think it's the javascript slowing down anything so much as the sheer volume of resources that need to be loaded and rendered before finally showing the page and the assumption that your hardware is speedy enough to do all that prep before it gets around to showing you anything. For example if the browser goes to load something, like flash or an image, the rest of the page may have to wait to be loaded (even if it's 75% text). If it could display stuff as it loaded and change it as needed then maybe it would work better at least to the perception.

 

Turning Javascript off altogether will speed things up but will probably break everything. You may to have to tune and tweak what's allowed to get things working reasonably well. If there's a way to not load certain resources, like images, that might speed some things up.

 

Honestly I think a lot should be manageable. I can browse the web on my iMac G3 (was 233mhz, but has 333mhz proc in it) w/512mb ram and Classilla. It seems passable to me, but experiences are subjective. Maybe I just am more patient because I have plenty of other computers when I really need speedy access. The web is full of somewhat sloppy design afaik because modern multi-core processors and large amounts of ram hide the issues.

 

I doubt Classilla supports it but much later FF versions have a reader mode that works great if you just want to read the text on the page..

Edited by Nathan

Share this post


Link to post
Share on other sites

I would call that a debatable statement. Nostalgic for sure, but both are fairly retro in their own ways, especially if you don't directly utilize any of the UNIX capabilities of the latter. There's plenty of software for instance that is still around but requires 10.5+ to run a recent version. Also it's hardly a modern computer, given that's it PPC and not even a G5, considering that Apple moved to Intel processors over 10 years ago.

 

MacOS 9's cooperative multitasking is fruitful ground for frustration of all sorts.

Edited by Nathan

Share this post


Link to post
Share on other sites

Web developers don't target an operating system that was obsolete before it was released (let alone hardware that was of dubious performance levels when new), and Classilla will always be held back by the underlying OS. 

Share this post


Link to post
Share on other sites

Web developers don't target an operating system that was obsolete before it was released (let alone hardware that was of dubious performance levels when new), and Classilla will always be held back by the underlying OS. 

 

Not sure what you're responding to. I'd like the browser to be as light on resources as possible as a general rule. My modern machine is quite capable of running multiple programs at once and I expect it to not be reduced to a single tasking machine just because the developer is lazy.

 

I also think that from G3 on the hardware really should be capable of browsing most websites. I concede that flash is a mess, but most web stuff isn't really that resource intensive at the fundamental level. My suspicion is that caching of previously requested resources has been broken by people who simply want the site to reflect any change they make the moment it happens rather than allow the user to benefit from previous bandwidth use to not have to reload and re-download every single file and script for every single page even from the same site.

 

What parts of the underlying OS do you feel are an especial problem/difficulty?

Share this post


Link to post
Share on other sites

Storage is cheap. RAM is cheap. CPU power is cheap. 

 

Blaming Flash is a 2012 mindset. Relatively little of the web still uses it. Javascript is indeed the issue, and multiple cores really don't solve the issue; IPC improvements in single cores are the biggest help.

 

(This is why major Android developers have to handicap their use of JS on the platform, because the SOC's that Android has available quite frankly suck compared to Apple's Intel-challenging Ax series, especially in single thread performance)

 

Not sure what you're responding to

 

My original post was of course directed to the original poster, seeing as I didn't quote you in it. At any rate, Cameron Kaiser (the developer of Classilla and TFF) has gone into some of the issues inherent in making a browser for OS9; I don't have the links at hand, but a little searching should turn them up. 

 

but most web stuff isn't really that resource intensive at the fundamental level.

 

Again, this is an old mindset. Web browsers are no longer just browsers, they're development platforms. Browsers have been running increasingly sophisticated software for some time. 

 

This may be of interest: https://webkit.org/blog/7380/next-generation-3d-graphics-on-the-web/

Support was added to iOS 11, and likely is coming to High Sierra this fall. 

Edited by TheWhiteFalcon

Share this post


Link to post
Share on other sites

I know it's cheap, try not to be patronizing. Just because it's cheap doesn't mean I want it wasted for me on a day to day basis with no recourse except to not have  a web browser. I really doubt that the presence of javascript and the interpreter has anything to do with it. I am convinced it is the matter of the type and quantity of external content being accessed/loaded. Is there a good place to look for analysis of the matter?

 

You didn't /quote/ anyone and your response came immediately after mine. I can have a look at what he said when I find it.

 

Again, this is an old mindset. Web browsers are no longer just browsers, they're development platforms. Browsers have been running increasingly sophisticated software for some time.

 

 

It is not an old mindset, it is a different one. The fact is that there are competing views and always have been. This mainframe+terminals vs local computing resource. I wasn't around then, but the parallels are clear. There is nothing I can do for people who are stupid and continue to shoehorn things into a tool primarily designed to retrieve and display HTML pages. They are wasting a lot of time trying to shape a stick into a pickax/shovel/sword/... combo-item. Eventually they are going to have to ditch that approach for a different one; HTTP is not a good way to make a remote application.

 

I think the webkit people there are cracked up top and have lost their minds. Trying to make a one-size fits all web platform is at best a fool's gambit. At worst it might actually be evil and a tremendous mess.

Edited by Nathan

Share this post


Link to post
Share on other sites

I'll just go out on a limb to generally say that a G3 is by no means fast enough to render modern web sites. If you throw enough RAM, OS X or Linux, and a modern release of Firefox, Webkit, or Chrome at one, it would do it, but it would be very angry at you for it.

 

I have Pentium M systems, which you'll recall are known for roundly whupping the ass of Pentium 4 back in the day. Those Pentium M systems are all faster than a 1.8GHz P4M I had back in the day, which itself​ performs approximately as well as the 1.67GHz DSLD PowerBook G4 at Cinebench. (Making this an extreme approximation, but:

 

If you take the thought process that "A G4 is just a G3 but with altivec" than a 1.67 G4 should be3 at least 150% the overall speed of an improbably fast G3, say a blue-and-white with a 1GHz upgrade, or one of the fastest G3 iBooks.

 

Now, back to the Pentium Ms. Those things ​barely​ render web pages. It is in all senses a waiting game with a machine like that to go on, say, npr.org or apple.com or theverge.com and let the page render. And, those are machines that support up to 2 gigs of RAM and run Windows 7 and current web browsers, so you have a relatively apples-to-apples comparison with modern computers.

 

Now, if your point here is that this is all somehow morally or intellectually "wrong" in that web pages that render poorly on even Pentium Ms is something devs shouldn't do, then yes, I agree. I'd love to be able to still browse the web on my Pentium Ms and my Atom netbooks and early Core2 machines.

 

If your point is that the machines "can do it' even though it's basically provable that they can't acceptably do this task, or that the web is somehow different in nature than we know it to be, then, I'm sorry, but you have been misinformed. 

 

It is not an old mindset, it is a different one. The fact is that there are competing views and always have been. This mainframe+terminals vs local computing resource. I wasn't around then, but the parallels are clear. There is nothing I can do for people who are stupid and continue to shoehorn things into a tool primarily designed to retrieve and display HTML pages. They are wasting a lot of time trying to shape a stick into a pickax/shovel/sword/... combo-item. Eventually they are going to have to ditch that approach for a different one; HTTP is not a good way to make a remote application.

 

The flash is the problem mindset is an old one. I'd put money on every animated ad you see on the web these days, or 99.something percent of them, being animated with HTML5 and CSS and javascript - mostly to be able to show ads to iPhone and iPad users.

 

To add, "HTTP as a way to deliver applications" has actually worked fairly well. Is it a good use of local resources? No, not really, but those resources are cheap, people accept it as a valid alternative, and computers are fast enough to make up the difference, so developers keep doing it. Plus, this is literally how ChromeOS works and Chromebooks are currently the most popular type of laptop sold by the world's biggest retailer, so it's not like this is some kind of fluke.

 

I don't know if, at this point, there's any way to make them stop.

 

But that's not even what's being discussed here. At the core of what the OP wants is things like the web site to their local NPR station, CNN, and eBay. Those web sites are massively heavy and take a lot of resources to load. That's the kind of thing - modern HTML pages built with modern HTML techniques, that tenfourfox is okay at but G4s and G5s really aren't, let alone classilla, which is essentially code from the early 2000s, which as TheWhiteFalcon says, is itself held back by the fact that OS 9 was never afirst-class platform for Mozilla. I think WaMCoM Mozilla only ever really existed on Macs because it was still easy to port to Macs from when it was basically split off or continued on from a late release of Netscape.

 

It's not really only​ the fault of something like Mac OS 9 not supporting the G4 well. The G3 is a 20-year-old chip at this point, and the G4/G5 were slow compared to Intel platforms even in their time. I think on a relatively well equipped 7+ system you could hypothetically write a "modern" browser, although it would be such an extreme amount of work I don't think that anybody who "could" ever will, and that anybody not already skilled at both writing web browsers and programming for system 7/8/9 ever will. My thought process here is that Classilla, which is really wamcom Mozilla cleaned up a little bit with a new icon and name, is "good" but it hasn't moved the state of the art forward on that platform from where it was fifteen to seventeen years ago. Ultimately though, a G4 running OS 9, any version, is going to run code at a certain speed.

 

The problem the OP is having is two-fold:

1) the browser they have (and there will NEVER be a significantly better one for OS9) can not handle the complexity of modern javascript.

2) The computer they have, even if they used a better OS and browser, will slow down a lot under the load of modern javascript, because web sites have overly large amounts of it that is very complicated.

 

We can agree all day long that web sites shouldn't do that, but they will not stop, so the only real solution to OP's problem is to find a faster computer. Switching to OSX in the mean time is a Band-Aid which might help the computer not crash while rendering a page. It will not make anything faster, and​ if it's a slow enough G4 it could slow everyday usage down a lot.

 

G4s were not great at the web in 2005. They are downright awful at it today. Most of the G5s aren't really that much better. I will personally (as ever) make the argument that it's not really the best use of anyone's time to try to make a G4 their daily driver. A G5 is closer to that line, but it does not cross it.

 

(The line is Core2, by the way. A well equipped 45nm Core2 system is noticeably slow, but you can equip them with 4-16 gigs of RAM, depending on the particulars, and a good GPU that Chrome might be able to use to help rendering or accelerate display, etc.)

Share this post


Link to post
Share on other sites

The short version is that the solution to this problem is to buy a newer computer with a faster processor, more RAM, and an OS that is better equipped to handle the peculiarities of this workload.

Share this post


Link to post
Share on other sites

I can see that you are Very Smart™ and that further discussion would be a waste of time. 

 

And I can see that you are Odiously ObnoxiousTM and that further "discussion" would just be trading insults.

 

Now, if your point here is that this is all somehow morally or intellectually "wrong" in that web pages that render poorly on even Pentium Ms is something devs shouldn't do, then yes, I agree. I'd love to be able to still browse the web on my Pentium Ms and my Atom netbooks and early Core2 machines.

 

If your point is that the machines "can do it' even though it's basically provable that they can't acceptably do this task, or that the web is somehow different in nature than we know it to be, then, I'm sorry, but you have been misinformed. 

 

A little of A and a little of B to be honest.

 

At least part of what I am trying to convey is that it should be possible to convey the information they are conveying and maybe even most everything else except for a mere handful of things like smooth video streaming (I'd really rather read the news and weather report than watch it anyway). Also, there is something morally objectionable about lazily using the latest cutting edge stuff and leaving anybody that doesn't have your hardware in the dust simply because you can when it really doesn't seem like there is anything that should be intrinsically impossible to handle on a much older computer (aside from high quality video streams). Statements like "For a better experience Facebook update your browser" or something about gmail not supporting your browser therefore you should switch to chrome are just plain obnoxious. Similarly things like games not working on an older OS or something when they otherwise meet spec because the developer used some little library or API that isn't compatible seems shameful especially if it's not really something that's needed as a core/central feature.

 

Obviously it's beyond some systems entirely in most respects. It's not as though I expect my poor little LC II running at 16mhz w/10 mb ram and an 80mb hd to be able to browse anything resembling the modern web, I'm not sure I can convince to connect to a network. I imagine with an up to date browser it might manage ssh/telnet/ftp/sftp and whatnot or websites comprised mostly of text, images and very modest javascript usage. However, when the "web" makes a 1.5-2ghz machine with 1.5gb+ of ram struggle (like a late model ibook g4) or when Chrome with 5-10 tabs open on my fairly modern i7 laptop at 2.4ghz dual core with 8gb of ram seems to be eating 3gb+ of ram and a pretty good chunk of cpu it seems questionable. Frequently software seems to be the bigger issue. It really does seem in many cases though that it's not really the case that computer's hardware can't do it only that it will be a little slow or the available software itself isn't designed to.

 

 

To add, "HTTP as a way to deliver applications" has actually worked fairly well. Is it a good use of local resources? No, not really, but those resources are cheap, people accept it as a valid alternative, and computers are fast enough to make up the difference, so developers keep doing it. Plus, this is literally how ChromeOS works and Chromebooks are currently the most popular type of laptop sold by the world's biggest retailer, so it's not like this is some kind of fluke.

 

I don't know if, at this point, there's any way to make them stop.

 

  

That it works does not make it ideal or desirable. I at least don't care how the cheap the resources are, it's still a waste. Tangentially, I'd love to upgrade my laptop's ram if only they hadn't decided to go back to needing to disassemble the whole damn machine to get to anything. Chromebooks/ChromeOS are disgusting, the very last thing I need is an application or data storage mechanism that is external to my machine and could go down at any moment or suddenly become a subscription system/cost money later on not to mention pose a free target for hackers that it wouldn't otherwise be.

 

There is no way to make them stop so long as the money keeps rolling in.

 

 

The short version is that the solution to this problem is to buy a newer computer with a faster processor, more RAM, and an OS that is better equipped to handle the peculiarities of this workload.

 

 

Not sure how that fits OP's desire to use his retro computer for some daily activities. Might as well sum that statement up as "Go Future or Get Lost!".

 

 

G4s were not great at the web in 2005. They are downright awful at it today. Most of the G5s aren't really that much better. I will personally (as ever) make the argument that it's not really the best use of anyone's time to try to make a G4 their daily driver. A G5 is closer to that line, but it does not cross it.

 

 

There are perfectly good arguments that it's not the best or a good use of anyone's time to engage in anything anyone does related to this forum and the topics that are most often dealt with.

 

 

 

Edited by Nathan

Share this post


Link to post
Share on other sites

My suggestion for the OP is to disable JavaScript in Classilla and see if the performance improvement outweighs any loss of functionality. It's going to limit the usability of some sites, but others will work fine.

Share this post


Link to post
Share on other sites

You can also try the "mobile" version of sites.(i.e m.facebook.com). The "mobile" version was originally meant for "dumb" cellphones but with modern smartphones even they have been becoming more resource intensive. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×