Skip to content

Commit 471a017

Browse files
committed
Fix a major performance issue/bug.
Version 1.24.14.
1 parent 61a827c commit 471a017

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 1.24.14
2+
* Fixed a major performance issue/bug.
3+
14
### 1.24.13
25
* Fix [#40](https://github.com/BlueBoxWare/LibGDXPlugin/issues/40): ProhibitedAnalysisException.
36

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
pluginGroup = com.gmail.blueboxware
22
pluginName = LibGDX
3-
pluginVersion = 1.24.13
3+
pluginVersion = 1.24.14
44

55
pluginSinceBuild = 243.21565.193
66

src/main/kotlin/com/gmail/blueboxware/libgdxplugin/versions/VersionService.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ import java.util.concurrent.TimeUnit
3939
@Service(Service.Level.PROJECT)
4040
class VersionService(val project: Project, val coroutineScope: CoroutineScope) : Disposable {
4141

42-
fun isLibGDXProject() = getUsedVersion(Libraries.LIBGDX) != null
43-
4442
fun getUsedVersion(library: Libraries): MavenComparableVersion? = usedVersions[library]
4543

4644
fun getLatestVersion(library: Libraries): MavenComparableVersion? = library.library.getLatestVersion(this)
@@ -56,15 +54,15 @@ class VersionService(val project: Project, val coroutineScope: CoroutineScope) :
5654
while (true) {
5755
if (project.isLibGDXProject()) {
5856
updateLatestVersions()
59-
delay(SCHEDULED_UPDATE_INTERVAL)
6057
}
58+
delay(SCHEDULED_UPDATE_INTERVAL)
6159
}
6260
}
6361
}
6462

6563
fun projectOpened() {
6664
updateUsedVersions {
67-
if (isLibGDXProject()) {
65+
if (project.isLibGDXProject()) {
6866
coroutineScope.launch {
6967
Libraries.LIBGDX.library.updateLatestVersion(this@VersionService, true)
7068
}
@@ -81,6 +79,7 @@ class VersionService(val project: Project, val coroutineScope: CoroutineScope) :
8179
}
8280

8381
override fun dispose() {
82+
currentJob?.cancel()
8483
}
8584

8685
private suspend fun updateLatestVersions() {
@@ -134,7 +133,7 @@ class VersionService(val project: Project, val coroutineScope: CoroutineScope) :
134133
}
135134
}
136135

137-
if (isLibGDXProject()) {
136+
if (project.isLibGDXProject()) {
138137
SkinTagsModificationTracker.getInstance(project).incModificationCount()
139138
LOG.debug("libGDX detected")
140139
} else {

src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
<change-notes><![CDATA[
3333
<ul>
34-
<li>Fix <a href="https://github.com/BlueBoxWare/LibGDXPlugin/issues/40">#40</a>: ProhibitedAnalysisException.</li>
34+
<li>Fixed a major performance issue/bug.</li>
3535
</ul>
3636
]]>
3737
</change-notes>

0 commit comments

Comments
 (0)