Retrieve geometry too slow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
I'm doing an add-in to extract 3d geometry (let's call it GetGeo) of elements and came across behavior that I can't understand. Now I have two options for wrapping the main logic of getting 3d, and in all cases the behavior is different, but there seems to be a pattern.
1. Library with an entry point via IExternalCommand, activated via Add-In Manager.
In this case, if I open revit and call GetGeo to export one document, and then close revit, everything happens quickly, but if I continue to process other documents with GetGeo, then the 2nd and all the following will be processed about 7 times slower (a document of about 70k elements and a size of 280MB is processed for the first time 50 seconds, and the next 300-400 seconds)
2. A library with an entry point through IExternalDBApplication, activated when Revit is launched and using System.IO.FileSystemWatcher and IExternalEventHandler monitors the folder, when a new rvt file appears, it opens it in turn through Application.OpenDocumentFile and the document is processed in getgeo. In this case, the situation is absolutely the opposite, the first document, regardless of size, is processed for a long time (the same example for 280MB is also 300-400 seconds), and all the following are fast. Even if I delete and insert this 280MB rvt file, the first time it will be processed for 300-400 seconds, the remaining times are 50 seconds.
Developer Advocacy and Support +