sky10p / regexh-contributions

Ayuda a traducer la app de regex a más idiomas
7 stars 3 forks source link

[Feature request] Way to duplicate the string x times instead of copy pasting #15

Open Palloxin opened 5 months ago

Palloxin commented 5 months ago

So since the timing feature has been added I would like to point that the timing of 1 match and the timing of 400 matches (string multiplied x400 times) is not that big (x6-7). So for a better time measurement I suggest a feature to multiply the string type in the string box instead of multiple copy pasting.

sky10p commented 5 months ago

Thank you for your suggestion regarding the timing feature, While I understand the need for a more efficient way to measure time, especially for larger quantities of matches, I believe implementing this feature may not be essential. Mobile platforms might not be the most suitable for such complex measurements. Additionally, I haven't come across other websites offering this specific functionality, indicating it might be a niche requirement. Could you provide an example of a site that has this feature? This would help me evaluate its feasibility, although I must consider the cost-value aspect carefully.

Palloxin commented 5 months ago

I gave an argument in #14 that can be applied to this feature request too. Also, others don't do it yes, but innovation has to start somewhere. A good example might be how Steam came to be. The founder had an idea, others didnt give it much thoughts so he did it himself... see how good that idea was today. Just saying. If everybody copies from each other there will be no unique product. One last thing. On the computer one can simply do CTRL + C/CTRL + V to do the duplication so it is waaay easier with a physical keyboard(and mouse), but this is a mobile app.

sky10p commented 5 months ago

I see your point regarding the feature request for RegexH. While the idea of integrating such a feature is intriguing, I'm concerned about several practical aspects of its implementation. For instance, the app was designed for less complex tasks, and adding advanced functionalities may cause issues like slower response times or increased app crashes, especially on older devices. Another concern is how to effectively manage memory usage when handling large or multiple duplications, as this could significantly impact the app's performance. How many should be the limit of automatic duplications?

Considering the app is maintained voluntarily and is offered for free, these potential issues pose a real challenge. I am open to exploring the addition of this feature under a settings configuration. However, my current understanding of Java expressions and their impact on processing time is limited, which makes me cautious about how effectively we can implement this without compromising the app's overall functionality.

Your input is greatly appreciated, and further discussion on these specific points could help me reach a decision that balances innovation with practicality and user experience. I aim to ensure any new feature is not just innovative but also practical, easy to use, and maintainable.

Palloxin commented 5 months ago

Just add a character limit in the string bar. On my huawei p8 lite 2017 i put 4500 "a" characters with the regex /aaa/ and it became a bit slow (still accettable). You could set the limit of max characters allowed dynamically based on the device. How?

Do a test in background on the first time the app is opened to test the permormance of the device. I, as an user, pasted 9k "a" characters in the string box with the regex aaa and it was rather slow:

https://github.com/sky10p/regexh-contributions/assets/75091899/f532f12c-6704-45cd-b192-531e5a7f750a

You could do this kind of measurement test to see how much character limit the app can allow the user assuring a performant app. There might be better ways to measure it too(idk maybe a code to quickly benchmark). So that was the Performance Limit. There should be a Second character limit and that is the Critical Limit to assure the app doesnt glitch, bug or crash. It should be x times the Permormance Limit (you have to decided it). The user can surpass the Performance Limit but a warning windows should popup (or just a Yellow warning icon somewhere, i prefer this onr). The user CANNOT surpass the Critical Limit (can't print more characters in the string box in any way possible).