Archive for December, 2010

New anti-spam rules on forum

Wednesday, December 22nd, 2010

A few days ago I started receiving a bit too many new user registrations so … as usual, I did something about it.

Long story short, here’s the link:

Related posts

My alternative “concept” browser

Sunday, December 19th, 2010

As I keep spitting fire on current browsers as you can read through my last posts since all of them are real resource hogs consuming memory and resources like crazy, I announced the possibility of creating my own concept browser, meaning that I will base it’s core on an existing one (embedded) and just implement my concept of how a real browser should handle resources.

My first project went up in smoke using TEmbeddedWb (from bsalsa) which is based on IE because with every tab switch the memory grew with around 3-5 MB. Then I tried some others, based on gecko but I ran into other problems PLUS memory leaks (although smaller).

So I got back to TEmbeddedWB because I got an idea: why not also destroy the object instance? This should force a complete memory de-allocation. Partially true.

Then I did some research and found the following:

// force memory to be really de-allocated:
SetProcessWorkingSetSize(GetCurrentProcess, $FFFFFFFF, $FFFFFFFF);
{FROM MSDN: -1, -1: If both dwMinimumWorkingSetSize and dwMaximumWorkingSetSize have the value (SIZE_T)–1, the function removes as many pages as possible from the working set of the specified process.}
// also equivalent to EmptyWorkingSet

Which indeed now showed a very nice grow of “only” 1 MB per tab BUT, this time depending on the contents of the tab. So if you load a 10 mb tab and then a 1 MB tab, or load a 10 MB and then a 20 mb, you still only loose 2 MB instead of 6+

So I figured if this really dropped the memory usage for the IE based project, how about trying the gecko one, despite the other bad “habits” it has. After fiddling with it a bit I got it working and the test results showed a pretty similar pattern in “leaking” as the one with IE. So at least from leaking point of view, the gecko and IE based projects are similar.

As a weird side-note, (I’m on D7 here and now) even after enabling the OleCtrls memory leak fix and recompiling EWB the memory leaks remained the same. True, that I didn’t use any interface property references which would explain this, but I thought that internally, the component might use them. Oh well, nothing is lost but nothing is gain either.

Since the mozilla activex control that I use for the gecko implementation is a bit old and unmaintained and lacks a lot of needed features for a browser, I will go with TEmbeddedWB in implementing a very skeletical and bare-bone and minimalistic but very light and resource friendly tabbed-browser.

And maybe I can finish it before the end of the year 🙂

Related posts

Safari, yet another memory hog

Sunday, December 19th, 2010

So, I installed safari … what was I thinking…

Clean install. Removed all “top sites” bullshit that loaded there. Let it to “stabilize” for maybe 3 minutes. Conclusion? I didn’t even load a page and it eats 164MB ram and 151MB VM = 315MB memory. Obviously, I just uninstalled it.

Are there any sane programmers out there capable of writing normal applications?

Related posts

Why Chrome browser really sucks

Saturday, December 18th, 2010

I’ll probably repeat myself but here goes: EVERY single (major) browser today sucks.

So Chrome is now on the table specifically. I have 6 tabs open.:

– gmail

– ebay

– yahoo mail

– ebay

– a static html page on my site

– and

Now, there are 10 (TEN) chrome processes running with following memory consumption (ramn and VM:

– 1: 43MB/32MB

– 2: 49MB/36MB

– 3:  24MB/16MB

– 4: 30MB/20MB

– 5: 38MB/28MB

– 6: 7MB/3MB

– 7: 30MB/23MB

– 8: 26MB/17MB

– 9: 10MB/6MB

– 10: 19MB/11MB

Total: 10 process with 276MB ram and 192MB VM = 468 MB memory consumed. I repeat 6 (SIX) open tabs.

Firefox is currently eating up 54 open tabs and 178 MB ram and 354 MB VM = 532 MB memory.

That is a HUGE difference.

Also, when chrome updates, it downloads it’s entire kit and installs it “clean” also leaving the old installation folders there. So it also eats up harddrive space (not that I’m running low on that).

But just imagine, on my 2GB ram+2GB VM system, firefox and chrome alone eat up 1 GB. 25% of available memory. And I just fired up VMWare with a system allocated 384 MB ram and taht one eats up 437 MB ram and 17 MB VM so there you go: firefox + chrome + 1 VM eat up 37.5% of system resources. And I have 65 processes running right now amongst which are 4 IM applications, thunderbird for email, avast as AV and outpost as FW.

I’m going to ditch chrome (probably for good) pretty soon.

Ok, so I noticed opera 11 is out (for some time) so I thought I’d give it a spin. I opened 4 tabs:

– yahoo mail

– gmail

– feedburner

– internet banking from RBS

Memory consumption for opera is now 248MB ram and 253MB VM = 501MB memory… I opened another tab and the memory only grew with maybe 5 MB so this gets me thinking: what in the world does opera load in memory if 5 tabd consume aprox 30 MB memory? What’s the rest of 470MB ???? Especially since opera was running for less than 5 minutes and the settings (AFAIK) are set for low memory consumption (including disabled memory cache)

Seriously now, is it just me or todays browsers are really just very lame memory/resource hogs?

Related posts

Mozilla Firefox ActiveX Control

Wednesday, December 15th, 2010

Well, as I said a few days back, I started on writing a small concept-browser.

First run at it was using TEmbbededWB from bsalsa. IE-based obviously (6.0 in my case). I ran the test project switching tabs and the applications memory kept raising and raising … ok, so we know IE sucks but this is ridiculous.

Then, I rememberd a mozilla project long ago (mozdev) but it seems they’ve gone dead for the past 5 years so … google-ing brought me to :

Now, there’s an IEPatch application there that supposidly converts it from using IE to using mozilla. Take it from me, at least with tembeddedwb, it doesn’t work. It will crash like crazy.

Now, after getting everything to work and removing the tembeddedwb stuff (including address bar) and rewriting the test project to suit the new control, things work fine. Well, almost fine because neither TWebBrowser nor TMozillaBrowser support changing the user agent (other than in the navigate method, but once you click on a link in the page, bye-bye). Aside from that, I started doing the memory test. AAAAAAnd it still leaks. Not as ugly as IE but still, about 1 MB per page load.

Ok, so this still suck.

Now, let’s find alternatives. D-Gecko on sourceforge.. dead for 2 years, no release.  TGeckoBrowser on sourceforge (based on d-gecko). dead for a year, one release. Has compilation issues (mainly caused by code used for debug, not ansi compatible (in D7)). After that’s fixed, it will compile and install in the IDE.

then, for whatever reason, they inlcuded the FastMM_FullDebugMode.dll in the project. Uhm … I’m pretty sure that somehow breaks the license of fastmm but that’s another story. The main issue is: did you people never heard of conditional defines?

Loading the first sample app: ChromeWin complains of not being able to find a unit referenced. duuh, improper path on the included pas file. It’s actually in the parent directory. Once that is fixed, an AV is thrown when opening the form.

Well, so much for today.

Conclusion: it all sucks and it’s back to IE. Or the mozilla activex control. at least they’re compatible and if the mozzila activex is less memory leaky than ie, then I’ll stick with it. And maybe fix the leaks too.

Related posts

Garfield and Kevin & Kell comics on email

Saturday, December 11th, 2010

Uhm… ok, so this is probably not for the general audience as not everybody can actually implement this but since I searched and couldn’t find a free way for getting it done, I made it myself (yes, the guys provide paid subscription but that’s not to my liking)

So, how I did it (as I do have my very own personal dedicated server about 1.5 m from my desk):

– I created a new subdomain to hold the below script (not available for public yet. well, you get an error if you access it 😛 )

– I installed a mail list script (phplist popped up in my google searches. mailman might also do it but since I am thinking about the future when I’d probably integrate it with automatic notifications on my site, it’s a good choice for me)

– I configured a list and a user (me) to get the daily email (comics in this case)

– I wrote a script that parses out the actual comic strips from the pages to include in the daily mail (it’s actually a wget piped with grep and sed, no big deal)

– I modified the above script to use phplist command line script to send the message to my list and then process the queue (basically sending the email to … me)

– I created a cron job that runs the above script a bit after the comics update

And now, I get a daily email with the comic strips mentioned in the header.

I *might* make this “newsletter” available for public (open or restricted) but only if other people are interested AND I get the consent from the comic strip authors (in which case I could probably get a direct url from the authors so to drop the wget parsing).

Related posts

WordPress upgrade issues: could not create directory

Sunday, December 5th, 2010

For a good few weeks all of my automatic upgrades stopped working. Meaning that they were working fine and then the next upgrade (which so happened to be for aplugin) didn’t work. I thought it was a WP 3.0.1 issue so I waited for 3.0.2 to come out and bummer. I was still getting: could not create directory wp-content/upgrade/wordpress-3.tmp/wordpress

So here I was google-ing the net for a solution, not finding one since everyone kept saying it’s a directory permission issue, which I eliminated like 3 times (including recreating the “upgrade” directory, then something hit me: I was reading in a few posts that people de-activated all plugins. I said, let’s try that. And you know, it worked.

So obviously I tried to track down the culprit and obviously I did: AskApache Password Protect plugin. Don’t ask me when that got broke or how but thing is, that one killed the upgrades.

So, I’ve done what any “sane” sysadmin would do: I deactivated the plugin and added the ap-admin with a directory apache restriction based on my local IP (which works fine since I only administer from home). Other people can add all their used IP’s (unless you’re behind a dynamic IP in case you should probably usea dyndns service)

Related posts