Profile Picture

Long Delay When Call SetLicense

Posted By Lance Levendowski 7 Years Ago
Author
Message
Lance Levendowski
Posted 7 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 6 days ago @ 1:19 PM
Posts: 59, Visits: 155
Calling Nevron.NLicenseManager.Instance.SetLicense with a valid license key takes almost 3 seconds which dramatically increases launch times while developing and for my users.  This delay occurs regardless of whether I use a developer license while running from the IDE, or a desktop license while running from an exe file that was compiled in release mode.
I'm using Nevron Vision for .NET Ultimate 2017.1 in Windows 10.
Eliminating this delay is a very high priority.  Do you have any suggestions?


Nevron Support
Posted 7 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hi Lance,
We were not able to replicate this behavior - the following code:

DateTime dt1 = DateTime.Now;
NLicenseManager.Instance.SetLicense(new NLicense("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"));
DateTime dt2 = DateTime.Now;Trace.WriteLine((dt2 - dt1).ToString());

Runs in less than a millisecond. In general this code will access the registry, find the UUID and compare it against the UUID hash stored in the license key. There is nothing special / time consuming about this. Do you have this behavior on a specific machine? Also can you send us an app that replicates this?



Best Regards,
Nevron Support Team



Lance Levendowski
Posted 7 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 6 days ago @ 1:19 PM
Posts: 59, Visits: 155
I might have found the problem.  I ran the attached app on three different computers with various versions of Windows and hardware.  They all took 2.6 - 3.2 seconds to call SetLicense.  Then I tried the app on a computer where I had previously installed one of your toolkits (e.g., setup.exe for Nevron Vision for .NET 2017.1 for VS2008).  Calling SetLicense on that computer took a minimal amount of time.

I've never installed your toolkit on my development machine because I prefer to keep it as clean as possible for testing and performance purposes.  Instead, I copy over the necessary files from another computer.  Of course none of my users would be expected to have your toolkit installed.

All license keys that I pass to SetLicense always unlock the appropriate functionality, regardless of whether or not the toolkit was installed.  It just takes a lot longer to call SetLicense on the computers where the toolkit was not installed.

Any advice?


Attachments
NevronSetLicenseTest.zip (423 views, 556.00 KB)
Nevron Support
Posted 7 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hi Lance,

We found the problem - for compatibility with older license keys the license key is checked against a machine id which is difficult to generate (involves getting the CPU ID, HDD id etc.) from WMI which was taking up this time. We have removed this compatibility and as a result the function should work much faster now. You need to download the new version we just uploaded today. Let us know if you meet any problems.

Best Regards,
Nevron Support Team



Lance Levendowski
Posted 7 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 6 days ago @ 1:19 PM
Posts: 59, Visits: 155
Yes, that fixed the problem.  Thank you for the quick response!





Similar Topics


Reading This Topic