You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by GitBox <gi...@apache.org> on 2020/08/16 11:16:01 UTC

[GitHub] [jmeter] FSchumacher opened a new pull request #610: Add a switch to disable splash screen on startup

FSchumacher opened a new pull request #610:
URL: https://github.com/apache/jmeter/pull/610


   ## Description
   
   Make showing of splash screen optional
   
   ## Motivation and Context
   
   Some users don't like the splash screen always on top of everything.
   This seems to be especially annoying, when JMeter takes a long time
   to initialize.
   
   [Bugzilla Id: 64658](https://bz.apache.org/bugzilla/show_bug.cgi?id=64658)
   
   ## How Has This Been Tested?
   
   Tested by hand (starting from CLI)
   
   ## Screenshots (if appropriate):
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Delete as appropriate -->
   - New feature (non-breaking change which adds functionality)
   
   ## Checklist:
   <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
   <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
   - [x] My code follows the [code style][style-guide] of this project.
   - [ ] I have updated the documentation accordingly.
   
   [style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jmeter] FSchumacher commented on pull request #610: Add a switch to disable splash screen on startup

Posted by GitBox <gi...@apache.org>.
FSchumacher commented on pull request #610:
URL: https://github.com/apache/jmeter/pull/610#issuecomment-676577785


   I haven't tried, what the splash screen does, when it is not instructed to be always on top. I fear, that it can come up behind the main window and irritate people, as JMeter will seem to stop being responsive until the (possibly hidden?) splash screen is removed.
   But I am really not sure, what the correct thing is.
   On the other hand, I think the real problems here are not the splash screen. If it would show for two seconds and then go away (as it usually does), nobody would really complain. This issue (the bugzilla one) has been opened as we have a lot of problems working together.
   
   * The splash screen stays always on top (or is displayed at all)
   * Every added element to the tree leads to an initialization of the complete tree with all already added and initialized elements
   * The construction of test elements via reflection seems to be slow (especially when a lot of elements are created serially)
   * (and this is the real killer) The usage of undo feature is used while constructing the tree on load and leads to a real bad performance
   
   So, all in all, I am pretty sure, that this PR is more of a cosmetic change and we should really focus on the other problems in that list.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jmeter] vlsi commented on pull request #610: Add a switch to disable splash screen on startup

Posted by GitBox <gi...@apache.org>.
vlsi commented on pull request #610:
URL: https://github.com/apache/jmeter/pull/610#issuecomment-676718539


   >So, all in all, I am pretty sure, that this PR is more of a cosmetic change and we should really focus on the other problems in that list.
   
   I agree the thing is cosmetic, yet I still think it is weird to create a configuration property for that.
   I'm inclined to merge https://github.com/apache/jmeter/pull/614 if you don't mind.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jmeter] vlsi commented on pull request #610: Add a switch to disable splash screen on startup

Posted by GitBox <gi...@apache.org>.
vlsi commented on pull request #610:
URL: https://github.com/apache/jmeter/pull/610#issuecomment-676594072


   > I fear, that it can come up behind the main window and irritate people, as JMeter will seem to stop being responsive until the (possibly hidden?) splash screen is removed.
   
   That is valid.
   
   It looks like `JDialog` + `ModalityType.APPLICATION_MODAL` + `undecorated` nails it.
   
   The result looks like "splash screen is always above JMeter window. The main window is **unclickable** as long as the splash is there, and the splash does not block other apps.
   
   ```diff
   --- a/src/core/src/main/java/org/apache/jmeter/SplashScreen.java
   +++ b/src/core/src/main/java/org/apache/jmeter/SplashScreen.java
   @@ -18,15 +18,16 @@
    package org.apache.jmeter;
   
    import java.awt.BorderLayout;
   +import java.awt.Frame;
    import java.net.URI;
    import java.net.URISyntaxException;
    import java.net.URL;
   
    import javax.swing.Icon;
    import javax.swing.JComponent;
   +import javax.swing.JDialog;
    import javax.swing.JLabel;
    import javax.swing.JProgressBar;
   -import javax.swing.JWindow;
    import javax.swing.SwingUtilities;
    import javax.swing.border.EmptyBorder;
   
   @@ -40,7 +41,7 @@ import com.github.weisj.darklaf.icons.ThemedSVGIcon;
     * Splash Screen
     * @since 3.2
     */
   -public class SplashScreen extends JWindow {
   +public class SplashScreen extends JDialog {
        private static final Logger log = LoggerFactory.getLogger(SplashScreen.class);
   
        private static final long serialVersionUID = 1L;
   @@ -53,6 +54,9 @@ public class SplashScreen extends JWindow {
            setLayout(new BorderLayout());
            add(loadLogo(), BorderLayout.CENTER);
            add(progressBar, BorderLayout.SOUTH);
   +        setModalityType(ModalityType.APPLICATION_MODAL);
   +        setAutoRequestFocus(true);
   +        setUndecorated(true);
            pack();
            setLocationRelativeTo(null);
        }
   @@ -91,7 +95,6 @@ public class SplashScreen extends JWindow {
        public void showScreen() {
            SwingUtilities.invokeLater(() -> {
                setVisible(true);
   -            setAlwaysOnTop(true);
            });
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jmeter] vlsi commented on pull request #610: Add a switch to disable splash screen on startup

Posted by GitBox <gi...@apache.org>.
vlsi commented on pull request #610:
URL: https://github.com/apache/jmeter/pull/610#issuecomment-676570177


   I just tried to remove `setAlwaysOnTop(true);`, and it produces reasonable behavior at least for macOS.
   
   It does show the splash screen, and it enables to switch between the applications.
   So I think we should remote `setAlwaysOnTop(true);`, and that is it.
   
   @FSchumacher ,  WDYT?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jmeter] vlsi closed pull request #610: Add a switch to disable splash screen on startup

Posted by GitBox <gi...@apache.org>.
vlsi closed pull request #610:
URL: https://github.com/apache/jmeter/pull/610


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jmeter] vlsi commented on pull request #610: Add a switch to disable splash screen on startup

Posted by GitBox <gi...@apache.org>.
vlsi commented on pull request #610:
URL: https://github.com/apache/jmeter/pull/610#issuecomment-676545350


   @FSchumacher , the original issue was that there's `setAlwaysOnTop` property which basically blocks all other applications.
   
   What do you think if we avoid `setAlwaysOnTop`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jmeter] vlsi commented on pull request #610: Add a switch to disable splash screen on startup

Posted by GitBox <gi...@apache.org>.
vlsi commented on pull request #610:
URL: https://github.com/apache/jmeter/pull/610#issuecomment-677790908


   Merged in https://github.com/apache/jmeter/pull/614


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org