Showing posts with label ram. Show all posts
Showing posts with label ram. Show all posts

Wednesday, September 01, 2010

JDK 7 new features (part 1)

Hi there,

We all know Java. Many love it, some dislike it, other actually hate it... and if they knew its weaknesses and flaws as I know some of them, well, they'd pity all the Java developers for choosing such a fragile platform and language...

 So basically , before you thought I hate Java, the thruth is just the opposite - check this blog's name :) - but I admit that Java has some veeeery bad treats and design flaws.

But why am I talking about Java flaws in a posting called "Java 7 new features" -- well , because they(the guys behind Java) try to address some of these problems , I'm also going to point some of them to you..

 
This list is not ordered by me - everywhere I look these features are presented in this order. I'll keep it that way for consistency.

Feature: 64/32 bit pointers support 
-- why store 32bit pointers in 64bit space, when you don't need it. The JVM will be more agile and not create empty spaces in the pointers, so less space will be required, which will help the traffic more than a local system with gigabytes of RAM. Performance boost.

Feature: Garbage-first Garbage Collection
- kills the young fast-dying generation first. and preserves objects that have survived the wipe a few times.
Result: more GC options and strategies -- performance boost.


Feature: dynamic languages in JVM
-- All can agree that Dynamic languages have big future ahead of them and that's a good reason that Java should try to adopt them and try to run them natively on a JVM. Thus making the JVM something like a universal VM for different kinds of languages. Imagine the freedom to combine different languages and techniques easily with native support and not some simulators.... no performance problems ... no interoperability problems... I really hope this is going to be implemented very professionally.

Added support for lambda functions, which could revolutionize some known patterns in the Java world - creation of an anonymous class for an interface like MouseListener and so on - now you can create a lambda implementation, pass it as an argument and inside it can be executed. This will make our Java a more interesting place. The anonymous-class design that was being forced because of the lack of such a feature and it's not intuitive at all. Let's see where this will get us.

Feature: Java modularity - Project Jigsaw
This project, in my opinion, will be an improvement, which will improve our Java experience. But what exactly is the problem? What do you mean with "Java modularity" ? Java is already modular, some will say... Well, it isn't.

Just check your local JRE installation and see in the \lib\  directory the rt.jar (rt = runtime). Notice the size - using latest JDK 1.6 Update 21, the rt.jar is around 47 MB.

Yeah, 47 MB and that's a module... yeah right. Nice design, guys! Many classes must be written with lots of lines to fill those 47 MB and believe me - these 47MB in rt.jar are all classes. Who wants to say how many millions of code...

But why when I only use java.net and java.lang should my JVM also load SWING and java.beans and javax.xml ... The sad reason is that all of them are all TIGHTLY coupled...

Somehow, somebody let it all loose control and everybody started pushing shit in this .jar file... well it works, so who cares? It's not modular... again, who cares? You can't easily extract a piece of it and place it elsewhere. You can't manage your JVM RAM requirements because of required modules being all stick together and you can't separate them.

Image that you can modify your JVM depending on your business case !
Well, project JIGSAW is trying to solve exactly this problem - separating all swing, applet etc modules into separate sub-projects and decomponentizing the  rt.jar into several (hundred?) jar files.

I imagine something like a ( JVM + OSGi ) ... yeah :)

I wish the developers good luck, because of the issues that could arise, and I think it's not a trivial job.
Remember they also have to maintain the backwards operability somehow...

...
I see that this post has become very long, so I'm going to continue it later.

Feel free to comment, because my view on a topic could be very wrong, but I'd love if you start a discussion. Especially when the topic is Java :)

Leni Kirilov

Saturday, May 15, 2010

Windows 7 Pro 64bit bugs

Hi, again,

I'm sharing my findings regarding Windows 7. I'm using Win7 Pro edition 64 bit, free for the students of my university. I thought that it's very well made and bug-free - all those open beta testing must have improved the new Microsoft OS.
It is indeed very good and a perfect successor of Win XP (I skip the unsuccessful experiment Vista), but I've found a few bugs - some very hard to find, others - hard to miss!

1. Navigation with "Back button" in Control panel.

Basically the case is the following:
- you enter the new Control Panel design - one can see some groups of settings in the center and some quick shortcuts on the left side. If you move your mouse over these links, a hand-cursor appears and if you click them, you are transferred to the corresponding menu.
How to see the bug?
- just click on a clickable content in the window (center part) and you should get to another place in the control panel.
- try to move your mouse over the left section with the quick links.
- click the BACK <-   arrow and you are back to the starting point.
- if you try to point over the quick links on the left again, some of them make the cursor change shape to hand, some of them not!
- if you click on some of these that don't make the cursor transform to hand , you will experience the bug - you are just sent to another menu, which doesn't correspond to the name of what you clicked!!! Absolutely without any reason... You can click XXX menu and get sent to YYY submenu... unpredictable feature is something one must try to avoid as best as possible.
The others that make the hand appear work OK...


2. Connection timeout leads to memory leak.

If you are using LAN network to connect to the Internet and you connect to your provider via PPPoE, you can experience this problem.

If your provider is down, but you try to connect nevertheless, it tells you something like "provider is down, try reconnect in 90 seconds" and the countdown starts...
If you have clicked "Automatic reconnect" on your connection settings, than your OS will keep repeating this for as long as you have setup... and I have set up something like 1000 - how could I predict that something wrong could happen:

- After 30-60 minutes of non-stop redialing, if you check task manager and see resources , you will notice that the process, which manages the redialing is consuming almost 1.8 GB of RAM !!! And continues growing...
Later I saw that the OS became absolutely non-responsive and even the mouse couldn't move... I haven't seen a problem like this for a long time... when you close the process, you can continue with your work, but of course very disturbing... and many nerves were wasted until I found the reason behind this.

My Internet provider had such problems for 2 days straight and I experienced this three times! I am very certain this is the reason. And I have enough RAM - 3 GB is more than enough for Win 7- 1.0 GB is taken up at start up.

CONCLUSION
- I have disabled "Automatic reconnect"
- I don't use quick links on the left, because they don't work in Control Panel (could be so elsewhere too...)
- I have created two bug reports to Microsoft site - no response and I don't expect.

For everybody who wants to report a bug to Microsoft Windows, you can do so here:
http://mymfe.microsoft.com/Windows%207/Feedback.aspx?formID=195
(I've spent quite some time to find this link - use it! 30 minutes now and a few hours in the past)

http://blog.hznet.nl/2009/03/can-i-still-send-feedback-with-windows-7-rc/
try this link - I have not tried this but it could work

So report whatever you see so that Windows 7 is better.
This is valid for every other software that you use!

L.K.