Written by

Enterprise Application Development Consultant at The Ohio State University Wexner Medical Center
MOD
Question Scott Roth · 1 hr ago

Dynamic Global Cleanup/Orphaned Globals

Was wondering if anyone had a Dynamic way to see if a Global is still being used by a Class File. 

We have been monitoring our Global Size recently, and I am trying to find problematic Class files that are not being cleaned up or used appropriately. I have come across some globals that do not seem to have a Class attached to them anymore, and instead of deleting globals 1 by 1, I was looking for a way that we could dynamically do this since the globals have data that is stale in them.

Thanks

Scott

Product version: IRIS 2025.1
$ZV: IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2025.1.3 (Build 481_1U) Tue Feb 3 2026 15:24:0

Comments

David Hockenbroch · 1 hr ago

Are you sure they were ever used for a class that no longer exists?

0
Scott Roth  1 hr ago to David Hockenbroch

If I search in VSCode using the global name, nothing is returned. So, either the Class file was recompiled to a new global, or no longer in the system.

These globals were created as part of %Persistent Data Classes that did not use Ens.Request or Ens.Response.

0
Robert Cemper · 1 hr ago

There are several hurdles to consider:

  • Scanning compiled class storage just shows definitions
  • Journals show active changed globals
  • I see no way for static globals that are written once, but just referenced without changes
  • Finally, globals might also be used without any class around
  • On top:  cross namespace references for classes and globals might apply as well   

Quite a can of worms.

0
Scott Roth  1 hr ago to Robert Cemper

If I don't see the Global associated with a Class, it doesn't seem to be getting cleaned up within the Daily Purge. So how do we clean these up in some cases?

0