Hallo,
meine erste Frage:
How do events have an influence on performance instead of direct call
Antwort:
Events can have a positive impact on performance compared to direct calls because they allow for loosely coupled code. By using events, the publisher and subscriber are decoupled, meaning that changes made to the publisher code will not affect the subscriber code. This can lead to more efficient code and easier maintenance. Additionally, events allow for multiple subscribers to be notified of the same event with minimal overhead, improving performance.
Die Antwort ist zwar grundsätzlich richtig, nur nicht für BC. Bei Gui- Oberflächen werden häufig Aktionen über Events ausgelöst, die den jeweiligen Controls über Queue zugestellt werden. Wenn das Control dann gerade dran ist, können in einem Durchlauf mehrere Events abgearbeitet werden. Bei BC sind die Events aber fest verbunden. d.h. wenn eine Event- Funktion aufgerufen wird, wird sofort auch der Subscriber aufgerufen.
Die Antwort ist aus meiner sich in diesem Zusammenhang falsch.
zweite Frage:
How do events decrease performance compared to direct call
Events can potentially decrease performance compared to direct call because they add an extra layer of abstraction and processing. When an event is triggered, the system needs to check for subscribers and execute their code, which can take additional time and resources. However, events also provide flexibility and extensibility, allowing for easier customization and maintenance of the system. It is important to weigh the benefits and drawbacks before deciding whether to use events or direct calls in a specific scenario.
Der erste Teil ist richtig, der zweite Teil Marketing.
dritte Frage:
How do events improve performance compared to direct call
Antwort:
Events improve performance compared to direct call because they allow for loosely coupled code that can be executed asynchronously. With events, the code that raises the event doesn't need to know or care about the code that handles the event, which means that changes to one piece of code won't affect the other. This allows for faster execution times and better scalability, as events can be handled by multiple subscribers simultaneously. Additionally, events can be queued and executed later, which can further improve performance by allowing the system to batch and optimize the processing of events.
Wie schon oben gesagt trifft das fĂĽr BC so nicht zu, und ist auch falsch, da der oft benutzte IsHandled- Parameter dann auch nicht funktionieren wĂĽrde.
4. Frage:
- Code: Alles auswählen
Are Events in BC faster than direct calls to a function?
Antwort:
Events in BC can be faster than direct calls to a function because they allow for more efficient processing and can reduce the amount of code that needs to be executed. However, the specific performance will depend on the implementation and the specific scenario. It is important to test and evaluate the performance of both options to determine which is the best fit for a particular situation.
5. Frage:
Are Events in BC slower than direct calls to a function?
Antwort:
Events in BC may have a slightly slower performance than direct calls to a function because they require additional processing to handle the event subscription and invocation. However, the use of events allows for more flexibility and extensibility in the system, as it allows for easier customization and integration with other apps. It is important to weigh the benefits and drawbacks of using events versus direct calls to determine the best approach for your specific scenario.
FĂĽr mich sieht das im Moment! mehr nach Eliza 2.0 aus.
Jeder bekommt das zu hören, was er hören will, mit einer zusätzlichen Priese positives BC- Marketing. Es wird vermieden eine negative Antwort zu geben.
Ich persönlich halte solche Systeme für gefährlich, wenn Sie nur eine Antwort liefern, die dann auch noch vom Antwortgebenden zu seinen Gunsten manipuliert wird.
Der Anwender ist dadurch nicht mehr in der Lage, andere Meinungen zu ĂĽberprĂĽfen, und sich eine eigene Meinung zu bilden.
Zu meiner gestellten Frage:
Natürlich sind Events mit festen Subscribern in BC immer langsamer, da der Verwaltungsaufwand für die Events dazu kommt. Wie sich das letztendlich auswirkt hängt vom im Event ausgeführten Code ab.
Ist das nur ein Einzeiler, um eine Variable zuzuweisen, die man in C/SIDE direkt eingefügt hätte, kann das schon mal den Faktor 4-5 langsamer sein, wenn man nicht alle Records als VAR an die Events übergibt. Ob man das dann merkt, dazu kommt es nur noch darauf an, wie oft solche Events mit wie vielen Subscribern aufgerufen werden.
GruĂź Fiddi