Allegro.cc - Online Community

Allegro.cc Forums » Allegro.cc Comments » OS update

This thread is locked; no one can reply to it. rss feed Print
OS update
Edgar Reynaldo
Major Reynaldo
May 2007
avatar

?Have you tried closing your browser and re-opening it? I'm sure there are memory leaks in just about every browser there is. I run SeaMonkey though, which is based on Firefox, but even I close my browser once in a while. You do know you can restore your tabs right?

Chris Katko
Member #1,881
January 2002
avatar

Disable all those porn extensions, Bam. ::)

Chrome --> Shift-Escape to load Chrome Task Manager which shows RAM usage by task.

It does lie, however. I've found ps and Chrome's ram usage do NOT line up (some times by large margins!).

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

bamccaig
Member #7,536
July 2006
avatar

?Have you tried closing your browser and re-opening it? I'm sure there are memory leaks in just about every browser there is. I run SeaMonkey though, which is based on Firefox, but even I close my browser once in a while. You do know you can restore your tabs right?

Of course. That doesn't really help though. I can watch the memory usage instantly climb back up to 4 GB in a couple of minutes. It's not the result of a slow leak. It's literally just that bad.

Chrome --> Shift-Escape to load Chrome Task Manager which shows RAM usage by task.

I have never found this useful. It's not like there's a single tab that is using 3 GB. The usage is pretty evenly spread out among the tabs, and the worst offenders are usually the most important to me (gmail, etc.).

Neil Roy
Member #2,229
April 2002
avatar

I think many pages load up content ahead of time in order to speed up browsing. You see more memory used these days, but you also have much faster, smoother browsing. The past was much slower for page loading and browsing, that's probably because they used less memory.

And yes, there are ads etc... but I don't see how that would use up THAT much data. It's obvious that when you have that many tabs open, each page is loading and pre-loading content for speed that it will rapidly chew up memory.

The solution is simple, have fewer tabs open or buy more memory. I really like how Firefox divides things up into several processes. It has really smoothed out browsing. I used to have to shut down and restart Firefox after using it a while, but haven't had to do that since they changed.

Add to all this the fact that people are less and less concerned with wasting memory and CPU speed, things can only get worse. I watched a video on programming languages that used the logic that while some scripting languages etc... are slower, today we have faster CPUs so that is okay now... I am like, WHAT?! So it is okay to use slower, less efficient methods and languages because we have faster CPUs and more RAM?!?! That is the dumb logic these days, get used to it. Programmers are getting lazy, languages are getting slower and hogging more RAM etc...

---
“I love you too.” - last words of Wanda Roy

bamccaig
Member #7,536
July 2006
avatar

Neil Roy said:

The past was much slower for page loading and browsing, that's probably because they used less memory.

I don't think that's true. In the past, Web sites were much more optimized. There was less content, and more efficient content, so they often loaded faster. Also keep in mind that our Internet speeds are much faster than they were in the past. 10 years ago I probably had DSL and was probably lucky to get 250 kb/s download speed. Now I have a cable line that can easily reach 25 mb/s download speed.

Quote:

And yes, there are ads etc... but I don't see how that would use up THAT much data.

https://www.techdirt.com/articles/20160317/09274333934/why-are-people-using-ad-blockers-ads-can-eat-up-to-79-mobile-data-allotments.shtml

Quote:

It's obvious that when you have that many tabs open, each page is loading and pre-loading content for speed that it will rapidly chew up memory.

The only sites that need to do this sort of thing are sites that have "feeds" of updates for new data. E.g., social media, image galleries, etc. And in those cases it's fine because it's better to load up parts of the data before you get to it than load the entire document/site. That said, the vast majority of Web sites do not work like that. There is no constant stream of new data to feed users, or large collections of images to stream to users. There's usually a fixed amount of text content with minimal images.

Quote:

Add to all this the fact that people are less and less concerned with wasting memory and CPU speed, things can only get worse. I watched a video on programming languages that used the logic that while some scripting languages etc... are slower, today we have faster CPUs so that is okay now... I am like, WHAT?! So it is okay to use slower, less efficient methods and languages because we have faster CPUs and more RAM?!?! That is the dumb logic these days, get used to it. Programmers are getting lazy, languages are getting slower and hogging more RAM etc...

The argument is more so that higher level languages are sufficiently fast to execute, much safer in terms of memory safety and the like, and much easier and shorter to write and maintain. For many programs, the performance penalty is negligible. It makes sense to write them in a high-level language far away from the metal that is quick and easy to write and maintain, safe, and just works. Other programs, that you use regularly, or that have a lot of work to do, still need to be precisely optimized in a low-level language closer to the metal. Browsers should be candidates for the latter, though I'm not sure to what extent that's true. Certainly I think an effort is made, but they're building on some really bad decisions that can't be unmade.

Neil Roy
Member #2,229
April 2002
avatar

It certainly is puzzling what is eating up so much memory. I use uBlock Origin for blocking ads and I noticed that no matter which of the popular browsers you use, they all seem to gobble up memory. With Firefox it got so bad it would start to slow things down to the point where I had to shut the browser down so the memory would be de-allocated then restart it. Their new scheme to have multiple processes has solved this issue nicely, but I would like to know, from someone who codes browsers what exactly is gobbling up the memory rather than speculating.

It is annoying, I will agree and I noted that sites like Facebook really gobbles it up fast, but that is to be expected given the amount of content you are using. Still, I don't trust Facebook at all given that it seems to know what I search for on sites like Google or Bing and I will see page suggestions which are related to my searches elsewhere! One time I just started searching for the same thing over and over again as a test, and sure enough, the suggestions on Facebook changed slightly. So now when I do something important, like online banking, I will shut my browser down completely, then restart it on a blank page then do my banking so that I know nothing was loaded by another page to spy on me.

---
“I love you too.” - last words of Wanda Roy

MiquelFire
Member #3,110
January 2003
avatar

Neil Roy said:

I will shut my browser down completely, then restart it on a blank page then do my banking so that I know nothing was loaded by another page to spy on me.

That may not be enough in some cases. Those like buttons, they are the trackers, so if you're doing something, the best option would be Private Browser mode/tab/window (or whatever it's called in your browser of choice). Might want to check uBlock's filter list for privacy stuff.

Not sure if they can track your banking stuff anyway. The tracking stuff is like the ads on the sites anyway.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

bamccaig
Member #7,536
July 2006
avatar

If anything looks to have broken, let me know here. I'll check back next year. 8-)

Is it just me, or have <code> tags and `` markdown broken somewhat? I've noticed that on Linux running Firefox if I try to select the contents of <code> tags the newlines appear to be lost. Similarly, I've noticed that using the backticks for inline code references sometimes doesn't work lately..

Neil Roy
Member #2,229
April 2002
avatar

I noticed that as well. Selecting multiple lines of source code is a royal pain as it comes out as all one huge line, no linefeeds at all. I will usually select it with line numbers included which help me know where the start of each line is.

---
“I love you too.” - last words of Wanda Roy

LennyLen
Member #5,313
December 2004
avatar

Neil Roy said:

I noticed that as well.

Which browser are you using? Code selection works properly for me using Chrome.

Neil Roy
Member #2,229
April 2002
avatar

I use Firefox, but I can select, copy and past anyting else from the browser, just not some of the code you find in a scrollable box. It won't include the linefeeds.

I can copy and paste this with no problems...

#include <allegro5/allegro.h>

int main()
{
  printf("blah blah");

  return 0;
}

But not this. If you click on SELECT and copy it, then paste it, the whole thing will be all one huge line without linefeeds.

#SelectExpand
1#include <gl/glew.h> 2#include <GLFW/glfw3.h> 3#include <stb_image.h> 4#include <glm/glm.hpp> 5#include <glm/gtc/matrix_transform.hpp> 6#include <glm/gtc/type_ptr.hpp> 7#include <learnopengl/shader.h> 8#include <learnopengl/camera.h> 9#include <learnopengl/model.h> 10#include <iostream> 11#include <cstdlib> // srand() 12 13using namespace std; 14 15void framebuffer_size_callback(GLFWwindow* window, int width, int height); 16void mouse_callback(GLFWwindow* window, double xpos, double ypos); 17void scroll_callback(GLFWwindow* window, double xoffset, double yoffset); 18void processInput(GLFWwindow *window); 19unsigned int loadTexture(const char *path); 20unsigned int loadCubemap(vector<string> faces); 21 22// settings 23const unsigned int SCR_WIDTH = 1280; 24const unsigned int SCR_HEIGHT = 720; 25float SCR_FOV = 45.0f; 26 27// camera 28Camera camera(glm::vec3(0.0f, 10.0f, 500.0f)); 29float lastX = (float)SCR_WIDTH / 2; 30float lastY = (float)SCR_HEIGHT / 2; 31bool firstMouse = true; 32 33// timing 34float deltaTime = 0.0f; 35float lastFrame = 0.0f; 36 37// etc...

---
“I love you too.” - last words of Wanda Roy

LennyLen
Member #5,313
December 2004
avatar

Neil Roy said:

I use Firefox

Since that's what bamccaig is also using, the problem is probably caused by a browser update since it's no doubt been a long time since the forum software was updated.

MiquelFire
Member #3,110
January 2003
avatar

I just looked at the code, and it's a div tag instead of a pre tag. Most likely, we see the line breaks because some CSS is changing things to make the div act like a pre.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

torhu
Member #2,727
September 2002
avatar

Could this be fixed with some custom JS here?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Neil Roy said:

But not this. If you click on SELECT and copy it, then paste it, the whole thing will be all one huge line without linefeeds.

SeaMonkey 2.49.1 does not suffer this problem. I can paste into CodeBlocks just fine., and into another SeaMonkey tab, and into a text file.

torhu
Member #2,727
September 2002
avatar

The white-space property of the div containing the scrollable text field is set to pre, maybe Firefox' text copy code doesn't account for that?

MiquelFire
Member #3,110
January 2003
avatar

I believe that is the case.

I believe there was a similar issue copying between XHTML and HTML with Firefox.

I had an issue where copying from Google Docs to a textarea did the same thing but found that pasting to then copying from notepad or something like it first worked.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

torhu
Member #2,727
September 2002
avatar

Neil Roy
Member #2,229
April 2002
avatar

I just installed Chrome and it seems to be working really nicely. Different than when I used it years ago. Imported everything from Firefox and so far it seems to look better somehow.

I may just stick with it, at least for a while anyhow.

I looked at that Firefox bugzilla and when I seen "3 years ago" I realized that wasn't getting fixed anytime soon so time to change I guess.

---
“I love you too.” - last words of Wanda Roy

torhu
Member #2,727
September 2002
avatar

The workaround is simple:
Start the selection on the gray area to the right of where it says "Expand". That's it. As long as either end of the selection is before or after the text box, the formatting is preserved.

Neil Roy
Member #2,229
April 2002
avatar

Thanks torhu, I am already reminded why I dislike Chrome. It disables video downloading extensions on Youtube, so I'll stick to Firefox.

I'll keep chrome on as a backup option, but I am reminded why I prefer Firefox.

Edit: On Firefox again and I tried your suggestion and it worked like a charm.

---
“I love you too.” - last words of Wanda Roy

Eric Johnson
Member #14,841
January 2013
avatar

Neil: You should check out Chromium instead of Chrome. It's the open-source version basically. Not sure if it's available on Windows though.

Erin Maus
Member #7,537
July 2006
avatar

@Aaron Bolyard
I love your vector graphics. Makes me want to use your Algae.Canvas project and render some SVGs!

Destructible terrain? Awesome. You've been doing some pretty cool stuff.

Regarding your website, I like it, but navigation is a little cumbersome. I also tried out a bunch of your stuff and it's all pretty neat. I tried the Brightside demo, but the keys weren't obvious and I couldn't really navigate through the game. Shooting laser beams into the building was pretty fun too. And I ran your Algae Canvas demo as well. It was taking between 12 and 16ms per frame though, which doesn't leave much room for logic and 60FPS at the same time. But it's amazing that you can render resolution independent graphics like that. Well done.

@Aaron: Just wanted to say that I really like your Web site. It's so clean and easy to read. :o I also think your Algae.Canvas project looks pretty cool.

Sorry for the late reply but thanks for the nice comments :).

@Edgar, you click on the left/right side of the screen to move left/right and space to perform an action (e.g., search the dead guy, open a door).

I'm working on a few projects here and there (Bubblegum [vector graphics in C], Discworld [a "GameDB" and goal planner], and ItsyScape [a dumb little game]; they're all related) so when they're more mature I'll add them to my site. Everything on my site is old, but it's pretty solid, I think.

Speaking of which, I should push my changes, ;D... I've only been pushing ItsyScape. Oh well.

---
ItsyRealm, a quirky 2D/3D RPG where you fight, skill, and explore in a medieval world with horrors unimaginable.
they / she

MiquelFire
Member #3,110
January 2003
avatar

You know what's odd, playing a game and having the game telling you that you might be up too late at night.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Eric Johnson
Member #14,841
January 2013
avatar

We have to post more often if we're to keep this thread alive, people!



Go to: