Exercise 2 Public Art in Parks - Feature Caching
Data City Neighborhoods (Google KML)
Public Art (Microsoft Excel)
Parks (MapInfo Tab)
City Orthophotos (GeoTIFF)
Overall Goal Examine a workspace that analyzes public art in city parks
Demonstrates Analyzing Performance
Start Workspace C:\FMEData2019\Workspaces\DesktopAdvanced\WorkspaceDesign-Ex2-Begin.fmw
End Workspace None

As you'll recall, the provincial government has given the city a grant to fund new public art in parks.

A colleague has created a workspace to analyze the amount of art in each city park and we are carrying out a code review to ensure that the workspace is efficient and well-designed.



1) Open and Run Workspace
Open your workspace from the previous exercise, or the workspace listed above. Previously we ran the workspace with caching turned on and it took about twenty seconds to run.

Now - to test production performance - turn off feature caching. There are no Inspector or Logger transformers, and no parts are disabled. So simply re-run the workspace.

You should find that the workspace runs a lot more quickly this time - perhaps in as little as five seconds:

Translation was SUCCESSFUL with 2 warning(s) (70 feature(s) output)
FME Session Duration: 4.8 seconds. (CPU: 3.3s user, 1.2s system)
END - ProcessID: 2524, peak process memory usage: 452260 kB, current process memory usage: 146324 kB

This clearly shows the performance reduction that caching can cause. This is particularly true in a workspace processing large raster datasets. Caching shouldn't be required in a production workspace because the authoring and debugging phases of development should be complete.


2) Assess Relative Performance
Although the workspace now runs very quickly, we could assess the relative performance of each section anyway.

Firstly disable all components after the readers, and run the workspace. Make a note of the time the workspace now takes to run:

Translation was SUCCESSFUL with 1 warning(s) (0 feature(s) output)
FME Session Duration: 1.4 seconds. (CPU: 1.0s user, 0.3s system)
END - ProcessID: 7148, peak process memory usage: 116928 kB, current process memory usage: 107228 kB

Now enable all transformers, leaving only the writers disabled. Re-run the workspace and make a note of the performance:

Translation was SUCCESSFUL with 2 warning(s) (0 feature(s) output)
FME Session Duration: 1.7 seconds. (CPU: 1.1s user, 0.4s system)
END - ProcessID: 1436, peak process memory usage: 146044 kB, current process memory usage: 142124 kB

From this we know that:

  • Reading data takes 1.4 seconds (the first partial run)
  • Transforming data takes 0.3 seconds (the second partial run minus the first partial run)
  • Writing data takes 3.1 seconds (the overall run minus the second partial run)

So writing data takes the longest in this workspace, although the workspace isn't really that slow anyway.

Still, in the next exercise we'll go on and see what we can change in the workspace to make it more efficient.


CONGRATULATIONS
By completing this exercise, you have learned how to:
  • Discover the performance liabilities of feature caching
  • Analyze a workspace for relative performance of different sections

results matching ""

    No results matching ""