def fast_compare(self, dir_path):
if self.latest_backup is None:<EOL><INDENT>return<EOL><DEDENT>if self.latest_mtime_ns is None:<EOL><INDENT>return<EOL><DEDENT>mtime_ns = dir_path.stat.st_mtime_ns<EOL>if mtime_ns > self.latest_mtime_ns:<EOL><INDENT>log.info("<STR_LIT>")<EOL>return<EOL><DEDENT>try:<EOL><INDENT>old_backup_entry = BackupEntry.objects.get(<EOL>backup_run=self.latest_backup,<EOL>directory__directory=self.path_helper.sub_path,<EOL>filename__filename=self.path_helper.filename,<EOL>no_link_source=False,<EOL>)<EOL><DEDENT>except BackupEntry.DoesNotExist:<EOL><INDENT>log.debug("<STR_LIT>")<EOL>return<EOL><DEDENT>content_info = old_backup_entry.content_info<EOL>file_size = content_info.file_size<EOL>if file_size != dir_path.stat.st_size:<EOL><INDENT>log.info("<STR_LIT>" % (file_size, dir_path.stat.st_size))<EOL>return<EOL><DEDENT>old_backup_filepath = old_backup_entry.get_backup_path()<EOL>try:<EOL><INDENT>old_file_mtime_ns = old_backup_filepath.stat().st_mtime_ns<EOL><DEDENT>except FileNotFoundError as err:<EOL><INDENT>log.error("<STR_LIT>" % err)<EOL>old_backup_entry.no_link_source = True<EOL>old_backup_entry.save()<EOL>return<EOL><DEDENT>if old_file_mtime_ns != old_backup_entry.file_mtime_ns:<EOL><INDENT>log.error("<STR_LIT>")<EOL>log.error("<STR_LIT>" % old_backup_filepath)<EOL>log.error("<STR_LIT>" % old_backup_entry.file_mtime_ns)<EOL>log.error("<STR_LIT>" % old_file_mtime_ns)<EOL><DEDENT>if old_file_mtime_ns != dir_path.stat.st_mtime_ns:<EOL><INDENT>log.info("<STR_LIT>")<EOL>log.info("<STR_LIT>" % old_backup_entry)<EOL>log.info("<STR_LIT>" % dir_path)<EOL>log.info("<STR_LIT>" % (old_file_mtime_ns, dir_path.stat.st_mtime_ns))<EOL>return<EOL><DEDENT>return old_backup_entry<EOL>
:param dir_path: filesystem_walk.DirEntryPath() instance