TS 68 JavaEditorPerformance

Test Specification:Performance of Java editor

Author: Roman Strobl & Max Sauer & Petr Dvorak & Jiri Prox
Version: 6.5
Introduction: This document serves as a test specification for editor module. It is focused on issues concerning editor's performance and on performance of related features.
Setup: Download and unzip a sample project. Use a command line switch: "netbeans --userdir NewUserdirFolderXX" (where XX is a number) before each test case to start IDE with a fresh userdir.

Contents



Test suite: Performance After Startup

Purpose: Test speed and issues caused by IDE initialization.
Setup: Start these tests immediately after main window is opened

  1. Open File After Startup
    1. Start the IDE
    2. Open file (just a file, not a project) OpenFile.java from the sample project in IDE (use "File|Open File" from the main menu)
    3. Close the file
    • EXPECTED RESULT: Editor should be opened within a reasonable time. It should be less than 3 sec. on usual workstation.
  1. Open Project
    1. Start IDE with a fresh userdir
    2. Open sample project
    3. Open file OpenFile.java
    4. Wait until file is opened, wait until scanning is finished (you can see the progress in right-bottom corner of IDE)
    • EXPECTED RESULT:
      - The selected project is opened in reasonable time.
      - Scanning is started immediately after opening the project and should be performed in reasonable time.
      - If IDE was installed from zip the JDK classes are scanned as well.
      - The file can be edited when opened, syntax coloring for all elements is shown in reasonable time.
  1. Open Editing Options After Startup
    1. Start the IDE
    2. Try to open Java editor options from Tools|Options|Editor|Formatting immediately after startup
    3. Switch tabs in Editor's options
    • EXPECTED RESULT: Options should be opened in reasonable time. Tabs should be switched in acceptable time.




Test suite: Performance when working with long files

Purpose: Tests speed of editing long files in editor
Setup: Prepare bigger file (PerformanceBigJava.java from sample project).

  1. Open Long Java File
    1. Open big java file in editor (e.g. from main menu : File|Open File)
    2. Wait for the file to be opened
    3. Close the file
    4. Open it again and keep it opened
    • EXPECTED RESULT: Time of opening/closing file should be acceptable
  1. Working With Long Java File - No comments
    1. Use the same file from previous case, open it if it is not opened
    2. Try to scroll the file with scrollbars sliders
    3. Add Javadoc comment before the method "newMethod" - type e.g. /** My first javadoc comment */
    4. Test the speed of Enter key inside JavaDoc - press Enter when caret is just after "/**" that you typed in the previous step
    • EXPECTED RESULT: All actions should be done in acceptable time.
  1. Working With Long Java File - No Errors
    1. Switch to the big java file (should be opened in editor from previous case)
    2. Type some new java elements to class, e.g. type Integer myInt = new Integer( and wait for completion
    3. Go through the code completion list
    4. Type 10); and press enter
    5. Go to the end of document (Ctrl+End)
    6. Go to the beginning of document (Ctrl+Home)
    7. Scroll the editor window - hold Ctrl+Up/Down longer then 4 seconds
    • EXPECTED RESULT: All actions should be completed in a very short time
  1. Working With Long Java File - Errors
    1. Switch to the java file (should be opened in editor from previous case)
    2. Do some changes that corrupts the file - corrupt some fields and methods, for example
    3. Go to the end of document (Ctrl+End)
    4. Go to the beginning of document (Ctrl+Home)
    5. Scroll to the editor window - press Ctrl+Up/Down longer then 4 seconds
    6. Type new field to body of a class - type "Integer myInt2 = new Integer(10);"
    • EXPECTED RESULT: All actions should be completed in a short time, errors should show up in editor almost instantly.
  1. Multiple Cloned Windows
    1. Switch to the big java file (should be opened in editor from previous case)
    2. Show popup menu over editor's tab and choose Clone Document item
    3. Undock the cloned document and dock it to the bottom of IDE, so that you create a "fake split view"
    4. Type some characters into original editor window
    5. Save file (Ctrl+S)
    6. Type some characters into cloned editor window
    7. Save file (Ctrl+S)
    • EXPECTED RESULT:
      - All cloned windows should have the same content as the original editor window.
      - Characters should appear in both original and cloned windows when typing
      - A flag indicating modified file is present in both tabs.




Test suite: Performance of Code Folds

Purpose: Test speed of collapsing/expanding code folds.
Setup: Open file performanceFolds.java

  1. Collapse and expand single fold
    1. Place the caret above the "myMethod" (like this: public void my|Method...)
    2. Press Ctrl+'-' to collapse a single code fold
    3. Press Ctrl+'+' to expand a single code fold
    • EXPECTED RESULT: A single fold should be expanded and collapsed in acceptable time
  1. Collapse and expand all folds
    1. Collapse the code fold by method myMethod by pressing Ctrl+Shift+'-'
    2. Expand the fold using Ctrl+Shift+'+' shortcut
    • EXPECTED RESULT: All code folds should be expanded and collapsed in acceptable time


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo