From: Andrew Haley <aph@redhat.com>
To: ffileppo <ffileppo@libero.it>
Cc: java <java@gcc.gnu.org>, classpath <classpath@gnu.org>
Subject: Re: [GCJ] Performance of GUI applications on embedded systems
Date: Fri, 07 Nov 2008 11:18:00 -0000 [thread overview]
Message-ID: <491423CE.8050704@redhat.com> (raw)
In-Reply-To: <K9YMPL$EE8A6F8D456C503AD6F47FAE27B666E7@libero.it>
ffileppo wrote:
> However I'm experiencing slowness when testing some other GUI sample application (e.g. the test case attached at the end).
>
> In this particular test case, the application takes a lot of time to startup (compared to the same device, running WinCE and CrEme JVM) and during start up the CPU usage is always at 100%.
>
> After startup, I'v also noticed that highlighting and/or clicking a certain number of times on buttons cause the application to hang and after that the CPU usage is always 100%.
>
> I'm still trying to get oprofile working on my target device to see what's going wrong.
Well, it doesn't have to run on the target device. It was easy for me
to duplicate your previous problem on my desktop machine with gcj and
oprofile. There's nothing to stop you doing the same.
Andrew.
> Test case:
>
> import javax.swing.JComponent;
> import javax.swing.JFrame;
> import java.awt.BorderLayout;
> import javax.swing.JButton;
> import javax.swing.JPanel;
> import javax.swing.JTabbedPane;
>
> public class GUITest {
>
> public static void main(String[] args) {
>
> JFrame frame = new JFrame();
> frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
> JComponent newContentPane = new TestUI();
> frame.setTitle("TestUI");
> newContentPane.setOpaque(true);
> frame.setContentPane(newContentPane);
> frame.setBounds(10, 10, 500, 400);
> frame.setVisible(true);
>
> }
>
> static class TestUI extends JPanel {
>
> long startTime;
> JPanel createPanel(int start) {
> JPanel p = new JPanel();
> p.setLayout(null);
>
> for (int i=0; i<100; i++) {
> JButton ltit = new JButton("Variable "+(i+start)+": ");
> long val = System.currentTimeMillis() - startTime;
> JButton lval = new JButton(""+val);
> ltit.setBounds(5, 10+20*i, 150, 15);
> lval.setBounds(200, 10+20*i, 150, 15);
> p.add(ltit);
> p.add(lval);
> }
> return p;
> }
>
> TestUI() {
> super(new BorderLayout());
> startTime = System.currentTimeMillis();
> JTabbedPane p = new JTabbedPane();
>
> for (int i=0; i<10; i++) {
> JPanel page1 = createPanel(i*100+1);
> p.add("P"+i, page1);
> }
>
> add(p, BorderLayout.CENTER);
> }
> }
>
> }
>
next prev parent reply other threads:[~2008-11-07 11:18 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-07 11:04 ffileppo
2008-11-07 11:18 ` Andrew Haley [this message]
2008-11-07 18:56 ` Andrew Haley
2008-11-08 11:40 ` Andrew Haley
2008-11-08 12:47 ` Andrew Haley
2008-11-09 0:25 ` Andrew John Hughes
2008-11-09 10:11 ` Mark Wielaard
2008-11-09 13:55 ` Andrew Haley
-- strict thread matches above, loose matches on Subject: below --
2008-11-10 8:55 ffileppo
2008-11-10 10:20 ` Andrew Haley
2008-11-06 13:40 ffileppo
2008-11-06 16:40 ` Andrew Haley
2008-11-06 17:02 ` Christian Thalinger
2008-11-05 13:53 ffileppo
2008-11-05 14:07 ` Andrew Haley
2008-11-05 14:26 ` Andrew Haley
2008-11-05 8:24 ffileppo
2008-11-05 9:44 ` Andrew Haley
2008-11-05 9:45 ` Mark Wielaard
2008-11-05 9:50 ` Andrew Haley
2008-11-03 12:51 ffileppo
2008-11-03 14:53 ` Andrew Haley
2008-11-03 15:04 ` Andrew Haley
2008-11-03 7:38 ffileppo
2008-11-03 10:37 ` Andrew Haley
2008-11-03 12:02 ` Andrew Haley
2008-11-03 12:54 ` Andrew Haley
2008-11-03 13:02 ` Roman Kennke
2008-11-03 13:14 ` Andrew Haley
2008-11-03 15:46 ` Andrew Haley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=491423CE.8050704@redhat.com \
--to=aph@redhat.com \
--cc=classpath@gnu.org \
--cc=ffileppo@libero.it \
--cc=java@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).