How to improve the application starts?

Hello

I have a user interface that uses fx: include to include a handful of knots in a StackPane.  So far, I have less than 10 components and I can already see a delay of about 3 seconds (on an older machine) when the initial stage is built.  It is particularly notable because I use a front loader with a progress bar.  The progress bar is smooth until the start() pre-loader calls on my request.  After that, the scene is built on the thread of the application, the progress bar does not get more updates.  It looks like the progress bar freezes until the main stage is built and illustrated.

I was hoping that I could build the main stage on the thread of JavaFX Launcher, but it does not work.  I tried and, unsurprisingly, get an exception to not being on the thread of the application.  What are the options, if any, to apply for a start-up feel a little smoother?

I found that it is often the reflection of FXML which makes things slowly (and Yes, for application of reasonable size with a lot of controls it is really quite slow IMO).

There is another potential break when you add controls to an hour of active scene the first and made initial these controls occurs, but it is usually less overhead due to reflection FXML.

You can load the FXML out of the thread of the application.  I know you tried and encountered problems, but should be fixed issues for Java 8u40 (if you can wait as long...).  The fix is for RT-17716 some controls cannot be created on the FX application thread , which should be available in access at the beginning of 8u40.  So you can try again and see if FXML creation out of the thread of the application doesn't really now for popup controls such as ToolTips and ComboBoxes, that has already failed.  If it still does not work, please file a new bug, because it is annoying that the FXML of loading is both so slow and must be made on the application thread.

The other option is to precompile the FXML in binary java so that at run time, your username doesn't have to wait as the logic of thinking slow to run.  Maybe it's better anyway.  There is an already css source the compiler to binary file in the packaging of java software, but not (yet) an equivalent to FXML.  There was third party efforts to get the binary compilation FXML working by Tom Schindl, who do so much.  I do not know how to complete the third cross compilers are. little I guess you could try for your application and see.  You might want to prod the openjfx-dev mailing list to see what the current status of this type of technology.

See also this thread: performance problem FXML with bombers of static, the BeanAdapter methods are slow, which means a scenario of degradation of specific performance, which may or may not affect you.

You could make an architectural change to your application to instantiate lazily your 10 components when they are used rather than the start (for example if they are the tab panes that are not immediately visible or could be initially with a placeholder that is replaced by "real content" over time, because the loading process completes for each component - kind of like loading the data of the image in html).  Depends on your application, which, easy or difficult, it would be to do.

It is probably useful to do a quick reference point, which measures twice:

1. the fxml loading time without attaching one of the nodes in instantiated to a scene active.

2. the times takes to show your scene the first time after you have fixed node instantiated at the scene.

This way you can tell if the performance problem is FXML related loading or something else.

* 8/27: edited to correct the link to RT-17716

Tags: Java

Similar Questions

  • Satellite A300-1PH - how to improve the battery life

    I want to get an extended battery...
    How to improve the battery life?
    I have the Satellite A300-1PH.

    Hello

    You want to extend the battery work in order to use the laptop longer with the battery power?

    Well, in order to extend the battery work, you should check the Vista power settings.
    Here, you can assign some settings like brightness etc. who would save the energy of the battery of the screen.

    For more details, see this document how:
    + How to manage Windows Vista power management features? +
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=41

    If you want to know wow to get the most out of the battery, consult this FAQ from Toshiba:
    http://forums.computers.Toshiba-Europe.com/forums/Ann.jspa?annID=20

    See you soon

  • How to view the application menu in the app?

    Hi all

    Does anyone know how to view the application menu in the app?
    The ultimate effect is that when you see the user swipe down from the top of the screen, the menu of the application.

    Thank you very much.

    Please check the recent threads or duplicate search before posting questions: http://supportforums.blackberry.com/t5/Cascades-Development/Application-Menus/td-p/1785653

  • How to hide the application programmatically?

    Hello

    How to hide the application by programtically?

    Thank you.

    Just to clarify this point, here's what you need to do to use the lines that I gave you:

    In the fieldChanged for the button method, you must run the lines that I showed you.

    This will put your UiApplication in the background.  The user will be able to bring to the forefront again by pressing the icon or choosing the form of application for the selector of the task.

    The user can in fact do roughly the same thing by pressing menu and selecting ' Application Switch, if it appears in the menu.  And that's roughly the same by pressing the menu key and then selecting another application in the selector of the task.

    If this isn't what you want, then please describe what you want again and why it's different from this.

  • How to install the application in the folder "Applications" on Storm (Bold).

    Hi guys.

    I'm looking for how to install the application in the Applications folder on the storm.

    Google map is installed in the folder "Applications" when installing it from the web.

    I would like to know how to do it.

    Please share the knowledge.

    Thanks in advance.

    Take a look at this thread.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=31323&query.ID=68...

    Concerning

    Bika

  • How to improve the rendering time on MacBook Air

    Hi all

    Processor: Intel Core i7-4650U @ 1.70 GHz, 2.30 GHz
    Installed memory (RAM live): 8.00 GB
    System type: 64-bit, x 64 processor operating system
    Operating system: 8.1 Enterprise, 64-bit Windows (boot to the Windows partition with bootcamp, work is not as a virtual machine)

    Any ideas how to improve the rendering performance of a YouTube video that I created. I realize that the rendering is not ideal on a MacBook Air, however, there are free of RAM and CPU capacity according to the directives of the screenshot:

    Adobe Media Encoder v2.png

    For example, I put that he should leave 1.5 GB of RAM for other programs, but there are still 3 GB free.

    (FYI at 01:24 popped it up to 100% of the CPU)

    Any help much appreciated.

    Kind regards

    Ben

    This isn't a very powerful machine.  It is probably not much to do.

  • I downloaded Photpshop elements 13: how to open the application?

    I downloaded Photpshop elements 13: how to open the application?

    for windows, you have downloaded an exe and a 7z file. put them both in the same directory, then click on the exe file.

  • How to improve the performance of the import

    I'm converting a database of its current WE8ISO88591 character set AL32UTF8
    I use NLS_LENGTH_SEMANTICS to TANK so I don't have to increase the length of the column.

    I followed the instructions in the Oracle:
    144808.1
    313175.1

    Except import that takes too long.

    I took a full database export WE8ISO8859p1 and now its importation in AL32UTF8.

    It is always difficult to prove slow source; but I think it has to do something with NLS_LENGTH_SEMANTICS. On the same
    Server; If the new database was in WE8ISO8859P1, a 5 million row table import took 2 hours; but in Al32UTF8 with NLS_LENGTH_SEMANTICS it takes 1 day!

    No idea how to improve the performance of the import.

    DOUBLE WIRE!

    Please, don't post duplicate discussions.

    Mark this thread ANSWER and continue to use your original thread where you are already helped.

    You have NOT given the info that has been ask in your other thread.
    Re: NLS_LENGTH_SEMANTICS = CHAR import is too slow

  • How to improve the resolution of the image with the help of filters

    How to improve the resolution of the image with the help of filters?

    resolution of the image, please check the links below. They should give you a clear idea about the resizing and resampling of images.

    http://helpx.Adobe.com/Photoshop/KB/Advanced-cropping-resizing-resampling-Photoshop.html#m ain_Resizing_and_resampling_images

    Understanding vs Resample resize | Learn Photoshop CS6 | Adobe TV

    See you soon!

    ~ David

  • How to improve the search function on a VerticalFieldManager that contains custom managers

    I have a screen with a VerticalFieldManager for a list of custom managers holding.

    The screen also contains an EditField that behaves like a search field, when the user enters the text, my app looping through an array of custom managers and compares the text entered with the text of all managers in the table.

    If the text of a Manager matches the input string, I add this handler to the VerticalFieldManager.

    Here are the relevant parts of my code:

    EditField _editField.
    TempBeanPlaces [] _placesList;
    VerticalFieldManager _vfmCellPlaces;

    ....

    This is the constructor of TemBeanPlaces:

    public TempBeanPlaces (String pPlaceName, CellPlaceManager pCellPlaceManager) {}
    placeName = pPlaceName;
    cellPlaceManager = pCellPlaceManager;
    }
    ...

    And this code handles the research:

    _editField.setChangeListener (new FieldChangeListener() {}
    ' Public Sub fieldChanged (field field, int context) {}
    String text = _editField.getText () .toLowerCase ();
    _vfmCellPlaces.DeleteAll ();
    for (int i = 0; i)< _placeslist.length;="" i++)="">
    TempBeanPlaces tempBeanPlaces = _placesList [i];
    If (tempBeanPlaces.getPlaceName () .toLowerCase (). IndexOf (Text)! = -1) {}
    _vfmCellPlaces.Add (tempBeanPlaces.getCellPlaceManager ());
    }
    }
    updateLayout();
    }
    });

    This works well when the _placesList table is not too big (length of 50, for example), otherwise the application becomes too slow.

    How can I optimize my code for large quantities of custom managers? For example, in the case, the table contains 600 elements.

    I really need to improve this feature. I just read on the ListField in BlackBerry, but since I have this code, maybe I need to rewrite all with ListFields.

    Thanks in advance!

    The biggest problem with update fields as it is time to layout, fields that are added.  If you add such a moment, then each addition will cause a layout.  Instead, you use addAll to add an array of items, or you can also add all of your items to a single Manager, and then add the Manager.  Then the layout occurs only once.

    In your code, the option would be to add managers selected to a vector, transform the vector into an array, then use addAll.

    You don't need the updateLayout().

    That said, more you add them fields, more processing will be available anyway, then perhaps you are trying to add more elements than even this optimization will execute quickly.  If this optimization does not work enough, then you will need to look in a different way, say 'paging' results, then the display doesn't show that the top 25 and the user can 'add more '.  This 'Exchange' is a good approach in my experience, because users will rarely scroll 25, when they can make another research that could give them better results.

    Finally, and to be on par with the comment of Simon, ListField is an extremely effective area because it is a unique field, so layout is easy, and he's not trying to paint lines until they are actually displayed on the screen.  So in your case, you have three options:

    (1) addAll

    (2) paging

    (3) ListField

    Let us know how you go.

  • How to configure the application runs at startup under netbeans?

    Hello

    i've got app that extends the Application. I want to start after installation and after each reboot of the device. I know it can be done very easy-properties and setting "auto-run" under eclipse Drinking now, I started using netbeans-does anyone of you know how can I do this in netbeans? or maybe I should add proper line in the *.jad file?

    concerning

    It seems that it's not impossible. also, it is not possbile to generate the adequate *.cod file, can cause the netbeans for blackberry plugin is very simple and do not have a lot of options, it should have. It looks like this project has left behind a year or two he y a. and it seems that he has only jde or eclipse to choose.

    concerning

  • How to create the Application on HFM 11.1.2.2 profile

    Hello

    I just installed Hyperion Financial Management 11.1.2.2. Everything was going well until I tried to use HFM. I saw no classic directors like the previous version, and when I tried to create workspace request, it forced me to fill in the value of the application profile (based on what I know about the previous version, the application profile is created from the classic administration).

    However I tried to explore the Oracle Documentation (Hfm_admin.pdf), and I find that it does not help because it says that I can create the application profile of the Office of management financial (I recognize nothing but the trash is located on my desktop).

    Since this is a new version of Hyperion, according to me, there is not a lot of guide that can help, and so I ask the suggestion of experts here. I hope someone can help me solve this problem, since I need to use the application to learn how to use.

    Thank you.

    Hello

    11.1.2.2 has new features and changed much about the interface.

    Like the previous versions, application profile is always created in the client HFM.
    But on this client version do not settle while you install the suite EPM.
    The installation of the client programs must be downloaded separately which is available on the edelivery.oracle.com (EPM System Release 11.1.2.2.0 Client installers for Microsoft Windows V31866 - 01.zip)

    For once you download and install HFM customer would be installed for you to create the application profile, and in this client version could be used only to define the profile and the management of metadata.
    And once the customer installed the starter kits would be also be installed where we could see examples of applications.

    11.1.2.2 menu is administration of Consolidation where you have an option to create, save, open applications...

    Hope this helps,

    Thank you
    Charles Babu J

  • How to improve the performance of EI

    I have a Panasonic HMC 151 and it generates MTS (this is AVCHD) files. I used Sony Vegas as my video editor NLE now for more than a year and acquired After Effects to work on some scenes, where a NLE Editor is short. I'm a bit disappointed by the performance of EI. Don't get me wrong: I love AE! It can work miracles, and he will certainly become a very tool in my toolbox. But at the same time, I thought I'd eploy all processor possible resources, in order to speed things up.

    I have a file MTS, 10 seconds of time, and put that on the timeline in AE, no effect at all. I go try it in AVI, the best settings. AE uses 4 minutes for this rendering. I load the same file MTS in Sony Vegas and go out to AVI here too. Vegas uses 23 seconds! And the resulting files are almost exactly the same size. Using the Windows Task Manager, I can is that when rendering AE, make employment resources 23% occuopies. In Las Vegas, on the other hand, it's completely - 93 to 97%. I have a Quad Core and of course After Effects use a fraction of the power available from my PC.

    As is the case, the rendering speed is not my main problem. I'm more interested to increase overall performance when you work in AE, preview, application of effects and so on. And when it comes to this, things are surprisingly slow and my CPU is essentially idle, or about 25% occupied.

    Is there a parameter of performance in AE, I forgot? Something like "use the n number of cores?

    ingvarai

    ingvarai:

    First and foremost, it is to be noted that the comparison of After Effects to any editing application only in terms of file i/o is not a good idea. Obviously, software editing will be more responsive to that. Performance of the AE should be evaluated in the conext of complex layering and image processing, which is what it was designed to do. In other words, the measure of how long it takes to AE making a naked video clip is not representative of what you can do in After Effects.

    That said, After Effects has a very powerful multiprocessing system in which it engenders a given instance (not a wire but a whole headless version of the application) for each carrot in your computer. Thus, for a quad core CPU, for example, AE could transparently use 4 instances of rendering. However, this technique requires that you have at least 2 GB of RAM by heart, or it will be counterproductive - the rendering of background process would starve and slow things down. To enable this feature, go to Preferences > memory and multiprocessing and activate the section "made simultaneous multiple images. If you do not have at least 2 GB / processor/core, it is important that you limit the number of instances, so they receive no less than 2 GB of RAM each.  This by defining a number of cores/processors free for other applications in this section. In addition, it is not a good idea to spawn instances of rendering for virtual cores (i7 processors in the family may report twice as many physical cores like here because of hyperthreading).

    For more information, see the help page for After Effects on the memory and multiprocessing preferences.

    Note that for formats such as AVCHD, if your project is more intensive I/O-intensive processor (several elements of film with little processing), you can see little improvement because the compression intertrame / time is very intense for decode. If possible, it is not a bad idea to convert these points to a combination of format-codec lossless/no compressed for beter performance. For typical AE projects, that is to say a lot of layers and composting operations, the function of "Render multiple frames simultaneously" can provide drastic improvements in making gears. Still, this depends on the nature of the project.

  • How to remove the Firefox Start Page?

    Whenever I open Firefox newly put back, it opens the 'Mozilla Firefox Start Page' as well as my home page in a 2nd tab. I do not use Google. I don't want it on my browser session.

    Have you checked for many home pages?

    Versions of Firefox 4 + use a new build-in home page named Subject: House with a Google search bar on this issue (no internet access required for the loading of this page).

    What about: home page only shows a few clips and has a button to restore the previous session, as appropriate.

  • Satellite P300 - 19 p - how to improve the graphics for Microsoft FSX?

    Please could someone tell me if and how I can improve the graphics of my laptop when I run Microsoft FSX?
    Of course, I could buy a good laptop with a high-performance graphics card, but is it something I can do to improve the graphics?

    Thank you very much.

    Hi Ben

    First of all, I must say that Flight Simulator X needs a lot of graphics performance and this game is really high system requirements. You need a powerful CPU, graphics card and enough RAM.

    Regarding your question an update of the map for example graph it s is not possible. It s fixed/soldered on the motherboard and there is no Exchange possible on desktop.
    So if you want a laptop that is faster for games, you can buy a new one, like the Qosmio X 500.

    You can only improve performance if you reduce the resolution of the screen or the details of the game.
    Make sure also that if the last page Toshiba display driver is installed.

Maybe you are looking for