[vtk-developers] Add GetModifiedTime deprecate GetMTime

Ken Martin ken.martin at kitware.com
Mon Aug 1 12:49:34 EDT 2016


I am looking for some feedback here. We have a problem in VTK that on
Windows unsigned long GetMTime is limited to 32 bits due to the type of
unsigned long (even on 64 bit builds). This problem creeps up for any VTK
application that runs for a long time (say 4 hours or more depending on
what the application is doing). I feel like we need to fix this but from
what I can see there is no trivially easy fix. Changing the signature of
GetMTime would break external code that overrides GetMTime. So my thought
is to add a new method called GetModifiedTime that returns a 64 bit
unsigned int. Convert VTK to use this method and provide backwards
compatibility support for external code to still compile/link/and work.

I have created a sample topic here
https://gitlab.kitware.com/vtk/vtk/merge_requests/1724 that shows the basic
idea.  In that topic I have not converted over all the other GetMTime calls
in the VTK tree which I would want to do, rather it is just a topic to show
the idea behind the change. I believe it handles the common cases properly
with only one failure case I know of so far (documented in the comments for
that topic).

If we went with such a change I believe existing code would still work
unchanged (aside from a warning)

This change would allow external code to have both GetMTime and
GetModifiedTime so that the external code would work with both old and new
versions of VTK.

This change will cause some performance issues if VTK_LEGACY_GETMTIME is
left on. Turning VTK_LEGACY_GETMTIME off would remove the performance cost
but require external codes to be updated to GetModifiedTime.

It would be nice if I was missing some easy pain free solution here so
please holler if you see something, have thoughts, etc.

Thanks
Ken


-- 
Ken Martin PhD
Chairman & CFO
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065
518 371 3971

This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160801/6fbb5ece/attachment.html>


More information about the vtk-developers mailing list