about summary refs log tree commit diff stats
path: root/src/LYExtern.c
Commit message (Expand)AuthorAgeFilesLines
* snapshot of project "lynx", label v2-8-9dev_16fThomas E. Dickey2018-02-201-3/+3
* snapshot of project "lynx", label v2-8-8dev_17Thomas E. Dickey2013-11-291-5/+5
* snapshot of project "lynx", label v2-8-8dev_16xThomas E. Dickey2013-11-281-9/+9
* snapshot of project "lynx", label v2-8-8dev_15eThomas E. Dickey2013-05-061-1/+4
* snapshot of project "lynx", label v2-8-8dev-15bThomas E. Dickey2013-05-011-1/+15
* snapshot of project "lynx", label v2-8-8dev_13Thomas E. Dickey2012-08-161-3/+3
* snapshot of project "lynx", label v2-8-8dev_9nThomas E. Dickey2012-02-101-2/+2
* snapshot of project "lynx", label v2-8-8dev_8mThomas E. Dickey2011-06-111-0/+426
* snapshot of project "lynx", label v2_8_8dev_9aThomas E. Dickey2011-06-111-426/+0
* snapshot of project "lynx", label v2-8-8dev_7Thomas E. Dickey2010-12-111-5/+6
* snapshot of project "lynx", label v2-8-8dev_6fThomas E. Dickey2010-12-091-5/+12
* snapshot of project "lynx", label v2-8-8dev_6Thomas E. Dickey2010-10-041-2/+2
* snapshot of project "lynx", label v2-8-8dev_5eThomas E. Dickey2010-09-261-5/+5
* snapshot of project "lynx", label v2-8-8dev_3cThomas E. Dickey2010-05-031-0/+418
* snapshot of project "lynx", label v2_8_8dev_6cThomas E. Dickey2010-04-291-418/+0
* snapshot of project "lynx", label v2-8-7dev_12aThomas E. Dickey2009-01-021-2/+2
* snapshot of project "lynx", label v2-8-7dev_11cThomas E. Dickey2008-12-301-14/+1
* snapshot of project "lynx", label v2-8-7dev_9bThomas E. Dickey2008-07-051-3/+2
* snapshot of project "lynx", label v2-8-7dev_5fThomas E. Dickey2007-08-021-2/+2
* snapshot of project "lynx", label v2-8-7dev_5cThomas E. Dickey2007-07-241-1/+3
* snapshot of project "lynx", label v2-8-6dev_16Thomas E. Dickey2005-12-181-51/+127
* snapshot of project "lynx", label v2-8-6dev_8Thomas E. Dickey2004-11-071-1/+1
* snapshot of project "lynx", label v2-8-6dev_6Thomas E. Dickey2004-10-111-2/+2
* snapshot of project "lynx", label v2-8-6dev_3Thomas E. Dickey2004-05-071-41/+33
* snapshot of project "lynx", label v2-8-6dev_2Thomas E. Dickey2004-04-271-16/+16
* snapshot of project "lynx", label v2-8-5pre_5Thomas E. Dickey2004-02-021-1/+1
* snapshot of project "lynx", label v2-8-5dev_17Thomas E. Dickey2004-01-081-1/+1
* snapshot of project "lynx", label v2-8-5dev_15Thomas E. Dickey2003-04-281-1/+1
* snapshot of project "lynx", label v2-8-5dev_9Thomas E. Dickey2002-10-071-7/+3
* snapshot of project "lynx", label v2-8-5dev_6Thomas E. Dickey2002-01-021-22/+11
* snapshot of project "lynx", label v2-8-5dev_2Thomas E. Dickey2001-08-151-10/+2
* snapshot of project "lynx", label v2-8-4dev_21Thomas E. Dickey2001-06-031-46/+7
* snapshot of project "lynx", label v2-8-4dev_20Thomas E. Dickey2001-04-021-191/+234
* snapshot of project "lynx", label v2-8-4dev_5Thomas E. Dickey2000-07-171-2/+2
* snapshot of project "lynx", label v2-8-4dev_4Thomas E. Dickey2000-06-231-5/+10
* snapshot of project "lynx", label v2-8-3dev_23Thomas E. Dickey2000-03-271-30/+16
* snapshot of project "lynx", label v2-8-3dev_22Thomas E. Dickey2000-03-131-3/+3
* snapshot of project "lynx", label v2-8-3dev_19Thomas E. Dickey2000-02-151-8/+18
* snapshot of project "lynx", label v2-8-3dev_10Thomas E. Dickey1999-09-291-2/+2
* snapshot of project "lynx", label v2-8-3dev_9Thomas E. Dickey1999-09-141-49/+40
* snapshot of project "lynx", label v2-8-3dev_7Thomas E. Dickey1999-08-261-7/+7
* snapshot of project "lynx", label v2-8-3dev_4Thomas E. Dickey1999-07-141-2/+332
* snapshot of project "lynx", label v2-8-2dev_21Thomas E. Dickey1999-03-301-3/+4
* snapshot of project "lynx", label v2-8-2dev_9Thomas E. Dickey1998-12-131-41/+20
* snapshot of project "lynx", label v2-8-2dev_2Thomas E. Dickey1998-11-101-27/+9
* snapshot of project "lynx", label v2-8-1dev_4Thomas E. Dickey1998-11-061-9/+27
* snapshot of project "lynx", label v2-8-1pre_11Thomas E. Dickey1998-10-171-5/+2
* snapshot of project "lynx", label v2-8-1pre_6Thomas E. Dickey1998-10-011-1/+1
* snapshot of project "lynx", label v2-8-1dev_25Thomas E. Dickey1998-09-071-12/+1
* snapshot of project "lynx", label v2-8-1dev_21Thomas E. Dickey1998-08-151-4/+3
> = [obj.path for obj in self.marked_items] files = [] for name in filenames: if isdir(name): try: item = self.fm.env.get_directory(name) except: item = Directory(name) else: item = File(name) item.load_if_outdated() files.append(item) self.disk_usage = sum(f.size for f in files if f.is_file) self.scroll_offset = 0 self.filenames = filenames self.files = files self._clear_marked_items() for item in self.files: if item.path in marked_paths: self.mark_item(item, True) else: self.mark_item(item, False) self.sort() if len(self.files) > 0: if self.pointed_obj is not None: self.sync_index() else: self.move(to=0) else: self.filenames = None self.files = None self.cycle_list = None self.content_loaded = True self.determine_infostring() self.last_update_time = time() self.correct_pointer() finally: self.loading = False def benchmark_load(n): loader = Loader() fm = OpenStruct(loader=loader) SettingsAware.settings = Fake() FileManagerAware.fm = fm dir = Directory(TESTDIR) t1 = time() for _ in range(n): dir.load_content(schedule=True) while loader.has_work(): loader.work() t2 = time() return t2 - t1 def benchmark_raw_load(n): SettingsAware.settings = Fake() dir = Directory(TESTDIR) generator = dir.load_bit_by_bit() t1 = time() for _ in range(n): raw_load_content(dir) t2 = time() return t2 - t1 class Test1(unittest.TestCase): def test_loader(self): loader = Loader() fm = OpenStruct(loader=loader) SettingsAware.settings = Fake() FileManagerAware.fm = fm # initially, the loader has nothing to do self.assertFalse(loader.has_work()) dir = Directory(TESTDIR) self.assertEqual(None, dir.files) self.assertFalse(loader.has_work()) # Calling load_content() will enqueue the loading operation. # dir is not loaded yet, but the loader has work dir.load_content(schedule=True) self.assertEqual(None, dir.files) self.assertTrue(loader.has_work()) iterations = 0 while loader.has_work(): iterations += 1 loader.work() #print(iterations) self.assertNotEqual(None, dir.files) self.assertFalse(loader.has_work()) def test_get_overhead_of_loader(self): N = 5 tloader = benchmark_load(N) traw = benchmark_raw_load(N) #traw1k = 250.0 #traw = traw1k * N / 1000.0 #print("Loader: {0}s".format(tloader)) #print("Raw: {0}s".format(traw)) self.assertTrue(tloader > traw) overhead = tloader * 100 / traw - 100 self.assertTrue(overhead < 2, "overhead of loader too high: {0}" \ .format(overhead)) #print("Overhead: {0:.5}%".format(overhead)) if __name__ == '__main__': unittest.main()