Is there a way to reuse FXMLLoader?

I have a TableView with a custom cell factory. The layout of a cell is defined in an FXML file. So, everytime the factory is called a new FXMLLoader is created and the contents of the same FXML file are loaded over and over and over again... Which seems like a potentially big performance hit (if the file is read everytime load is called). I would guess that TableView reuses cells during scrolling (instead of creating new ones) but I'm still curious if there's a way to somehow reuse an FXMLLoader that already loaded a file (it would be awesome to see the source code...). Speaking of the source code, how come it's not available for FXMLLoader?

Couple of things:
1) As you correctly noted, cells are recycled when possible and are only created as needed. So a new cell won't be created from markup every time it is scrolled into view. The existing cell(s) will simply be re-used.
2) By far, the most expensive part of reading an FXML document is reflection. The actual XML parsing is negligible. We've made some optimizations to 8.0 that significantly improve reflection performance, particularly when using an FXML document as a cell template such as this. A new setTemplate(boolean) flag was added to FXMLLoader to address this exact case. When this flag is set to true, FXMLLoader caches the classes that were loaded during a previous call to load(), allowing subsequent load() calls to execute much faster.
Greg

Similar Messages

  • Is there a way to reuse a region in multiple pages?

    Is there a way to reuse a region in multiple pages?
    For future maintenance, it would be easier to make changes in just one region. Maintaining multiple copies of a region is more work and eventually someone will forget to change one of the regions.
    Thank you.

    Hi wolfv
    Create your region on page 0 and then conditionally set the display of the region for specific pages in you application only.
    Under the region's "condition type" attribute select " Current page is Contained within Expression 1 (comma delimited list of pages)" and in Expression 1 put 1,2,4,6,99 etc or what ever pages you want it to appear on.
    This works especially well for tree regions.
    regards
    Paul P

  • DB6CONV/DB6 - Is there a way to reuse existing compression dictionary

    As some of you probably know, DB6CONV handles compression by retaining the Compression flag while performing the table move , but unfortunately not the compression dictionary. This is causing some issues for tables to increase in size because of the way new dictionary gets built based on sample 1000 rows. Please see an example below where the Data Size of a compressed table increased after the tablemove.
    For table SAPR3. /BI0/ACCA_O0900, please see the below statistics.
    Old Table:
    Data Size = 10,423,576 KB
    Index Size =  9,623,776 KB
    New Table (both data and index) with Index Compression (Moved  using DB6CONV, took 1 hr for 100 million row table):
    Data Size = 16,352,352 KB
    Index Size =  4,683,296 KB
    Reorg table with reset dictionary (By DB2 CLP takes 1hr and 32 Min)
    Data Size = 8,823,776 KB
    Index Size =  4,677,792 KB
    We are on DB2 9.5 and will soon be migrating to DB2 9.7. In order to use the reclaimable table space feature that comes with DB2 9.7, We are planning on creating new tablespaces ( especially for objects like PSA/Change logs in BW) and then move the compressed tables after enabling index compression, but the DB6CONV is not going to be the right tool based on our experience.
    Is there a way for DB6CONV or DB2 to reuse an existing compressed dictionary of the source table and reuse it when it performs a table move to a new tablespace.
    Thanks,
    Raja

    hi raja,
    no, DB6CONV cannot reuse the existing compression dictionary - this is in general not possible.
    BUT:  the good news is, that the next version V5 of DB6CONV will (amongst other new features) handle compression in a much better way! like R3load and online_table_move the compression dictionary will then be created based on  (if possible) 20MB of sampled data ensuring optimal compression.
    this new version will become generally available within the next few weeks.
    regards, frank

  • Is there a way to reuse an image placed in a document without copying it into the file again?

    I recently completed my first eBook with iBooks Author.  It is a photo essay and contains primarily photographic images.  In some places, I used the same image, or parts of the same image, in more than one place.  I could not find a way to locate the images I had previously copied into the book file, so I could refer to them and place the image in a new location.  It seemed, to me, that this was a common sense capability that would decrease the file sizes significantly.
    Did I miss something?
    Thank you.
    Ray

    nope, you didn't miss anything. IBA does;t have a library function listing your images. You'll have to copy/paste or re-nsert the image wherever you need it. If it's an image that you could put in a layout, then you only put it once and it appears on all pages that use that layout.

  • A way to reuse existing classes instead of generating the stub ones?

    Hello to all,
    I am using eclipse and weblogic 10.3 as an application server.
    I have a 1st project deployed with some exposed web services. I need to access these services from a 2nd project, so i run the clientgen ant task, which generates the client interface, along with some stub classes. These stub classes are basically a copy of the ones from the 1st project.
    My question is this:
    Is there a way to reuse the original objects that the 1st project is using, by putting the first project as a dependency on the second? Or do i have to use the generated stub classes?
    Thanks in advance! Any help is appreciated.

    hi raja,
    no, DB6CONV cannot reuse the existing compression dictionary - this is in general not possible.
    BUT:  the good news is, that the next version V5 of DB6CONV will (amongst other new features) handle compression in a much better way! like R3load and online_table_move the compression dictionary will then be created based on  (if possible) 20MB of sampled data ensuring optimal compression.
    this new version will become generally available within the next few weeks.
    regards, frank

  • Any way to reuse username.seen and preserve Read flags

    After migrating from a 10.3 Server to a 10.5 Server, what I find is that the "Read/Unread" flags have been reset.
    But cyrus keeps these records in the username.seen files.
    Is there any way to reuse these files for the read/unread flags to stick through migration?
    Message was edited by: Celia Wessen

    Hi,
    Use 'FORMAT INTENSIFIED ON' before your write statements.
    Links:
    http://sap-img.com/ab027.htm
    https://forums.sdn.sap.com/click.jspa?searchID=16122441&messageID=5116798
    Regards,
    Harish

  • Is there a way to create standard text messages that can be reused easily

    is there a way to create standard text messages that can be reused easily

    if you meant phrases, then Yes
    Setteings> general>keyboard> add new shortcut

  • Is there a way to run a script to create an RPD file from MDS XML files

    We would be interested in using the MDS XML format for the RPD file in saving it in our Subversion source code control system, and I have seen how to do this in the User documentation.
    Our question is whether or not there is a way to use a command line tool to recreate the rpd file without having to use the Admin tool, so that we can automate the deployment of the RPD file from source code control to QA and Production environments.
    If we check in the RPD file directly, then there is a way to automate the process, but we would prefer to use the MDS XML format since this allows us to save changes in text format, not binary, but we still need to be able to automate the process.
    In the Oracle Fusion Middleware XML Schema Reference for Oracle Business Intelligence Enterprise Edition document, I have found that there is a way to automate the creation of the MDS XML files from an RPD file using this command:
    biserverxmlgen -M -R repository_pathname [-P password] -D output_directory [-8] [-N] [-Q|-S]
    So my question is basically is there a way to reverse this process, to use some command line tool (or Weblogic Scripting or some other mechanism) to create the RPD file from the MDS XML files? Are there options on the biserverxmlexec command that will do what I am asking?

    Hey dmfairley,
    Thanks for the question. You can absolutely export the project as .mp3, as outlined in this resource:
    GarageBand Help: Export songs to disk
    http://help.apple.com/garageband/mac/10.0/#gbnd7cbf5ed9
    Export songs to disk
    You can export a project to your computer as a stereo audio file.
    Exported files can be reused in GarageBand to save processing resources by replacing or bypassing multiple regions, instruments, and effects. They can also be used with other music applications and devices, posted on the Internet (on a webpage, or in the iTunes Store, for example), added to an iTunes playlist, or uploaded to a mobile device such as iPhone or iPad.
    1. Choose Share > Export Song to Disk.
    2. To rename the exported file, select the name in the Save As field, then enter a new name.
    3. Choose a location to save the exported file from the Where pop-up menu.
    4. Select the format for the exported file (AAC, MP3, or AIFF).
    5. Choose the quality setting for the exported file from the Quality pop-up menu.
    6. Click Export.
    Thanks,
    Matt M.

  • Is there a way to force a new session so my "on new session" code will run?

    I'm using apex.oracle.com and I find values of application (global) and page items persisting across logins.
    I didn't expect that? I thought they would go away when I logged out of APEX. But I can change the values, logout, and log back in to the same values. And when I login and start an application, it's not running my "shared components > application processes" initialization code which is set "on new session".
    I thought each login would be a distinct new session with it's distinct set of items. (see definition below)
    So when I run an application, is there a way to force a new session so my "on new session" code will run?
    >
    What Is a Session?
    A session is a logical construct that establishes persistence (or stateful behavior) across page views. Each session is assigned a unique identifier. The Application Express engine uses this identifier (or session ID) to store and retrieve an application's working set of data (or session state) before and after each page view.
    Because sessions are entirely independent of one another, any number of sessions can exist in the database at the same time. Also, because sessions persist in the database until purged by an administrator, a user can return to an old session and continue running an application long after first launching it. A user can also run multiple instances of an application simultaneously in different browser sessions.
    Sessions are logically and physically distinct from Oracle database sessions used to service page requests. A user runs an application in a single Oracle Application Express session from log in to log out with a typical duration measured in minutes or hours. Each page requested during that session results in the Application Express engine creating or reusing an Oracle database session to access database resources. Often these database sessions last just a fraction of a second.
    >
    Thanks -- Howard

    I cleaned up the copy of the Select List code in APEX 4.1.xxx which was not operating correctly before. Now it matches what I have in APEX 4.2.yyyy. And, drum roll please, the select list seemingly works fine there (4.1) as well. But now, the initialization code--which was working fine(!)--FAILS in 4.1!
    <font size="3"><font color="red">•<font face="courier new">
    Okay. Maybe this will help. 1) I logged in. Ran the login page but did not login. Opened the "session" window and wrote down the session ID. Logged out and back in. 2) Ran the login page but did not login. Opened the "session" window and .... it has the same session ID? 3) <b>So the session is persisting across logins!! How is that possible?</b>
    (More) When I log into 3 different applications, I get a different session ID for each but repeated logins always give the same session ID for any given session. </font>

  • Is there a way to use EJBs directly inside WDJ without Model generation?

    Hello,
    Is there a way to use EJBs directly inside WDJ without Model generation, to avoid producing tonnes of code and reuse the JPA Entities?
    Thanks
    Sebastian
    Edited by: Sebastian Lenk on Nov 3, 2010 7:01 PM

    of course, you can.
    it's pure java programming.
    Context ctx = new InitialContext();
       Object o = ctx.lookup(
    "sap.com/HelloWorldEAR/REMOTE/HelloWorldBean/com.sap.sdn.ejb.HelloWorldRemote");
       HelloWorldRemote helloRef = (HelloWorldRemote) 
        PortableRemoteObject.narrow(o, HelloWorldRemote.class);

  • Is there a way to compress media and project files into something small

    I have a 2TB hard disk where all my FCP files - project files, media files and rendered files are stored.
    I am not sure I will reopen those projects but still to be onthe safer side I do not want to delete them
    but keep the compresed so that in case I need to open them some later time, I can open the project and do the edits.
    So is there a way to compress the files and store that I can reuse in a later stage but still take less space now.

    You can delete all the render files, since they can recreated when needed.
    And you can also delete the optimized or proxy media, if you have any, for the same reason.
    I doubt that you'd get much space back by using compression, since video files are already pretty much compressed.

  • Is there a way to make a custom transition

    Okay so Is there a way I can make my own custom transition for final cut pro and once it's made use it as if it's a normal transition. Like I know you can create templetes in motion for final cut but I want to make a transition instead. I was thinking it would just be something like you set the drop zones to be what ever clip is before and after wherever you are placing it but I can't seem to figure out how to do that. Thanks in advance.

    come on Bogie, don't you remember those cheesy video toaster transitions with silhouttes of women doing gymnastics across the screen as a transition.  They were very popular in public access here in NY.
    to the OP, do a search for alpha transitions in the fcp manual.  I think that's probably what you're looking for.  You can also customize many of the attributes of the existing fcp transitions and save them for reuse by simply dragging the transition to the browser effects tab.

  • Is there any way to filter an AD group for Synchronization?

    Project Server 2010 , the AD synchronization fails every week because of users who have left the organization.
    Is there any way to filter the AD group so that only active users are picked up into the application?
    Thanks in advance.

    Thanks Ricardo.
    The problem is that if a user leaves, his id is usually reused.
    Eg. John Smith leaves the organization, his ID JSmith is reused.
    But the original record is in the AD group, so it fails to recognize the new user say Jack Smith.
    The error seen in the logs is typically:
    " A resource could not be updated during Project Server Active Directory Synchronization because a duplicate windows account name conflict occured that could not be resolved. Resource GUID: d2077b6c97992-57d5-4d87-9ba9-c6ae273. Resource Name XYZ"
    and
    "the supplied windows account name is invalid."

  • Is there a way to transfer advanced actions from one project to another?

    We have several "developers" working on Captivate files.  It looks like I am going to need to do some of the advanced actions on other people's files.  Is there a way to export from mine into theirs

    One of my most urgents feature requests, but not yet there. I suspect it it mostly due to the fact that each object in CP needs its own unique ID, and that makes transferring advanced actions that do often reference objects pretty complicated. Nevertheless expect, hope that it will be possible in a future release.
    Only way to transfer advanced actions is using a template as I demonstrated in this old blog post:
    Template for reusing script
    Your project has to be based on that template to have the advanced actions available. There is no apparent way to make a template out of a CP-file, but usually just changing the extension of the CP-file from cptx to cptl will provide you with a template
    Of course you have to be very careful with the ID's as I started to explain.
    Lilybiri

  • Is there a way to flush out a socket's output stream without...

    ...having to close it (the stream)?
    I'm trying to implement a keep-alive feature in a simple HTTP Server application. This is a draft of the code I have trouble with:
    ==========
    //'clientSocket' is the socket obtained by the 'serverSocket.accept()' method
    OutputStream out = clientSocket.getOutputStream();
    //'message' is a string to be sent to the client
    InputStream data = new ByteArrayInputStream(message.getBytes());
    byte[] buff = new byte[2048];
    while (true)
    int read = data.read(buff, 0, 2048);
    if (read <= 0)
    break;
    out.write(buff, 0, read);
    out.flush();
    ==========
    If I don't call 'out.close()', the data will not be sent to the client.
    If I call 'out.close()', the data will be sent, but the socket will be closed too, which I don't want to. I need to be able to reuse that socket .
    Is there any way to properly push out the data to the client without having to close the output stream?

    ...having to close it (the stream)?Yes. OutputStream.flush(). But if you're not using any kind of buffered writer/output stream you don't even have to do that.
    If I don't call 'out.close()', the data will not be sent to the client.Untrue. The client will read everything that has been written If you don't close the output stream, the client will never get the EOS indication (e.g. read() returning -1). So if your client is looping until that happens it will loop forever ...
    Your problem at the moment is at the reading end.

Maybe you are looking for